Examples of ObjectAttribute


Examples of org.jmanage.core.management.ObjectAttribute

        StringTokenizer st = new StringTokenizer(displayNames, "|");
        MBeanService mbeanService = ServiceFactory.getMBeanService();
        for (Object anExpression : exprList) {
            Expression expression = (Expression) anExpression;
            ServiceContext srvcContext = null;
            ObjectAttribute objAttribute = null;
            try {
                srvcContext = Utils.getServiceContext(context, expression);
                objAttribute = mbeanService.getObjectAttribute(srvcContext,
                        expression.getTargetName());
            } finally {
                if (srvcContext != null)
                    srvcContext.getServerConnection().close();
            }
            assert objAttribute != null;
            assert objAttribute.getStatus() == ObjectAttribute.STATUS_OK;
            if(attribRepWhole.equals(expression.toString()))
              wholeAttrMap.put(st.nextToken(), objAttribute);
            else
              attrMap.put(st.nextToken(), objAttribute);
        }
View Full Code Here

Examples of org.jmanage.core.management.ObjectAttribute

        final DefaultPieDataset result = new DefaultPieDataset();
        if(whole.isEmpty()){
          double total = 0;
          for(String attribDispText : others.keySet()){
            ObjectAttribute otherAttrib = others.get(attribDispText);
            double segment = ((Long)otherAttrib.getValue()).doubleValue();
            total += segment;
          }
          for(String attribDispText : others.keySet()){
            ObjectAttribute otherAttrib = others.get(attribDispText);
            attribDispText += " in %";
            double segment = ((Long)otherAttrib.getValue()).doubleValue();
            segment = (100 * segment)/total;
            result.setValue(attribDispText, new Double(segment));
          }
        }else{
          String displayText = whole.keySet().iterator().next();
          ObjectAttribute attrib = whole.get(displayText);
          double wholeValue = ((Long)attrib.getValue()).doubleValue();
          double sumOthers = 0;
          for(String attribDispText : others.keySet()){
            ObjectAttribute otherAttrib = others.get(attribDispText);
            attribDispText += " in %";
            double segment = ((Long)otherAttrib.getValue()).doubleValue();
            segment = (100 * segment)/wholeValue;
            result.setValue(attribDispText, new Double(segment));
            sumOthers += segment;
          }
          displayText += " in %";
View Full Code Here

Examples of org.jmanage.core.management.ObjectAttribute

        List<ObjectAttribute> objectAttrList = new LinkedList<ObjectAttribute>();
        MBeanService mbeanService = ServiceFactory.getMBeanService();
        for (Object anExpression : exprList) {
            Expression expression = (Expression) anExpression;
            ServiceContext srvcContext = null;
            ObjectAttribute objAttribute = null;
            try {
                srvcContext = Utils.getServiceContext(context, expression);
                objAttribute = mbeanService.getObjectAttribute(srvcContext,
                        expression.getTargetName());
            } finally {
                if (srvcContext != null)
                    srvcContext.getServerConnection().close();
            }
            assert objAttribute != null;
            assert objAttribute.getStatus() == ObjectAttribute.STATUS_OK;
            objectAttrList.add(objAttribute);
        }
        request.setAttribute("objectAttrList", objectAttrList);
        return mapping.findForward(Forwards.SUCCESS);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.