Package org.mc4j.ems.connection.bean.attribute

Examples of org.mc4j.ems.connection.bean.attribute.EmsAttribute


    public EmsAttribute getAttribute(String name) {
        if (!loaded)
            loadSynchronous();

        EmsAttribute attribute = this.attributes.get(name);
        if (attribute == null && unsupportedType) {
            attribute = new DUnkownAttribute(this, name);
            this.attributes.put(name,attribute);
        }
View Full Code Here


            List<EmsAttribute> attributeResults = new ArrayList<EmsAttribute>();

            Iterator iter = attributeList.iterator();
            while (iter.hasNext()) {
                Attribute attr = (Attribute) iter.next();
                EmsAttribute attribute = getAttribute(attr.getName());

                attribute.alterValue(attr.getValue());

//                if (!values.containsKey(attribute.getName())) {
//                    attribute.setSupportedType(false);
//                }
View Full Code Here

      bean.refreshAttributes();
      if (trace) log.trace("Querying returned bean: " + bean);
      for (MeasurementScheduleRequest req : metrics) {
         DataType type = req.getDataType();
         if (type == DataType.MEASUREMENT) {
            EmsAttribute att = bean.getAttribute(req.getName());
            if (att != null) {
               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.trace("Metric ("+req.getName()+") is trait with value "+ value);
View Full Code Here

            EmsBean bean = conn.getBean(metricBeanName);
            if (bean != null) {
               if (trace) log.trace("Retrieved mbean with name "+ bean.getBeanName());
               bean.refreshAttributes();
               String attName = metric.substring(metric.indexOf(".") + 1);
               EmsAttribute att = bean.getAttribute(attName);
               // Attribute values are of various data types
               if (att != null) {
                  Object o = att.getValue();
                  Class<?> attrType = att.getTypeClass();
                  DataType type = req.getDataType();
                  if (type == DataType.MEASUREMENT) {
                     if (o != null) {
                        MeasurementDataNumeric res = constructNumericMeasure(attrType, o, req);
                        if (res != null) report.addData(res);
View Full Code Here

      bean.refreshAttributes();
      if (trace) log.tracef("Querying returned bean: %s", bean);
      for (MeasurementScheduleRequest req : metrics) {
         DataType type = req.getDataType();
         if (type == DataType.MEASUREMENT) {
            EmsAttribute att = bean.getAttribute(req.getName());
            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);
View Full Code Here

            EmsBean bean = queryComponentBean(metric);
            if (bean != null) {
               if (trace) log.tracef("Retrieved mbean with name %s", bean.getBeanName());
               bean.refreshAttributes();
               String attName = metric.substring(metric.indexOf(".") + 1);
               EmsAttribute att = bean.getAttribute(attName);
               // Attribute values are of various data types
               if (att != null) {
                  Object o = att.getValue();
                  Class attrType = att.getTypeClass();
                  DataType type = req.getDataType();
                  if (type == DataType.MEASUREMENT) {
                     if (o != null) {
                        MeasurementDataNumeric res = constructNumericMeasure(attrType, o, req);
                        if (res != null) report.addData(res);
View Full Code Here

            EmsBean bean = queryComponentBean(metric);
            if (bean != null) {
               if (trace) log.trace("Retrieved mbean with name %s", bean.getBeanName());
               bean.refreshAttributes();
               String attName = metric.substring(metric.indexOf(".") + 1);
               EmsAttribute att = bean.getAttribute(attName);
               // Attribute values are of various data types
               if (att != null) {
                  Object o = att.getValue();
                  Class attrType = att.getTypeClass();
                  DataType type = req.getDataType();
                  if (type == DataType.MEASUREMENT) {
                     if (o != null) {
                        MeasurementDataNumeric res = constructMeasurementDataNumeric(attrType, o, req);
                        if (res != null) report.addData(res);
View Full Code Here

            EmsBean bean = queryComponentBean(metric);
            if (bean != null) {
               if (trace) log.tracef("Retrieved mbean with name %s", bean.getBeanName());
               bean.refreshAttributes();
               String attName = metric.substring(metric.indexOf(".") + 1);
               EmsAttribute att = bean.getAttribute(attName);
               // Attribute values are of various data types
               if (att != null) {
                  Object o = att.getValue();
                  Class attrType = att.getTypeClass();
                  DataType type = req.getDataType();
                  if (type == DataType.MEASUREMENT) {
                     if (o != null) {
                        MeasurementDataNumeric res = constructMeasurementDataNumeric(attrType, o, req);
                        if (res != null) report.addData(res);
View Full Code Here

            String mbean = abbrevToMBean.get(abbrev);
            mbean = myNamePattern + mbean;
            EmsBean bean = conn.getBean(mbean);
            bean.refreshAttributes();
            String attName = metric.substring(metric.indexOf(".") + 1);
            EmsAttribute att = bean.getAttribute(attName);

            // Attribute values are of various data types ...
            Object o = att.getValue();
            Class type = att.getTypeClass();
            if (type.equals(Long.class) || type.equals(long.class)) {
               Long tmp = (Long) o;
               MeasurementDataNumeric res = new MeasurementDataNumeric(req, Double.valueOf(tmp));
               report.addData(res);
            } else if (type.equals(Double.class) || type.equals(double.class)) {
View Full Code Here

            EmsBean bean = queryComponentBean(metric);
            if (bean != null) {
               if (trace) log.trace("Retrieved mbean with name {0}", bean.getBeanName());
               bean.refreshAttributes();
               String attName = metric.substring(metric.indexOf(".") + 1);
               EmsAttribute att = bean.getAttribute(attName);
               // Attribute values are of various data types
               if (att != null) {
                  Object o = att.getValue();
                  Class attrType = att.getTypeClass();
                  DataType type = req.getDataType();
                  if (type == DataType.MEASUREMENT) {
                     if (o != null) {
                        MeasurementDataNumeric res = constructMeasurementDataNumeric(attrType, o, req);
                        if (res != null) report.addData(res);
View Full Code Here

TOP

Related Classes of org.mc4j.ems.connection.bean.attribute.EmsAttribute

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.