Examples of MBeanService


Examples of org.jmanage.core.services.MBeanService

                                 HttpServletRequest request,
                                 HttpServletResponse response)
            throws Exception {
        String objName = request.getParameter(RequestParams.OBJECT_NAME);
        /* find mbeans that have notifications */
        MBeanService mbeanService = ServiceFactory.getMBeanService();
        Map<String, ObjectNotificationInfo[]> mbeanToNotificationsMap =
          new HashMap<String, ObjectNotificationInfo[]>();
        Map<String, ObjectNotificationInfo[]> mbeansToNotificationsMap =
                mbeanService.queryMBeansWithNotifications(context.getServiceContext());
        if(objName != null){
            mbeanToNotificationsMap.put(objName, mbeansToNotificationsMap.get(objName));
            request.setAttribute("mbeanToNotificationsMap", mbeanToNotificationsMap);
        }else{
            request.setAttribute("mbeanToNotificationsMap", mbeansToNotificationsMap);
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

        }else if(sourceType.equals(AlertSourceConfig.SOURCE_TYPE_GAUGE_MONITOR)
                || sourceType.equals(AlertSourceConfig.SOURCE_TYPE_STRING_MONITOR)){
            Expression expr = new Expression(alertForm.getExpression());
            request.setAttribute("sourceMBean", expr.getMBeanName());
            request.setAttribute("attribute", expr.getTargetName());
            MBeanService mbeanService = ServiceFactory.getMBeanService();
            ObjectAttribute objAttr = mbeanService.getObjectAttribute(
                    Utils.getServiceContext(context, expr),
                    expr.getTargetName());
            request.setAttribute("currentAttrValue",
                    objAttr.getDisplayValue());
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

                form.getAlertSourceType())){
            sourceConfig = new AlertSourceConfig(expression.getMBeanName(),
                    expression.getTargetName());
        }else if(AlertSourceConfig.SOURCE_TYPE_GAUGE_MONITOR.equals(
                form.getAlertSourceType())){
            MBeanService mbeanService = ServiceFactory.getMBeanService();
            String attributeDataType = mbeanService.getAttributeDataType(
                    Utils.getServiceContext(context),expression.getTargetName(),
                    expression.getMBeanName());
            sourceConfig = new AlertSourceConfig(expression.getMBeanName(),
                    expression.getTargetName(),
                    CoreUtils.valueOf(form.getMinAttributeValue(),attributeDataType),
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

        AttributeSelectionForm form = (AttributeSelectionForm)actionForm;
        String[] mbeans = form.getMbeans();
        ServerConnection serverConn = context.getServerConnection();
        ObjectName objectName = null;
        Map<String, List> mbeanAttributesListMap = new TreeMap<String, List>();
        MBeanService mbeanService = ServiceFactory.getMBeanService();
        for(int i=0; i<mbeans.length;i++){
            objectName = new ObjectName(mbeans[i]);
            ObjectInfo objInfo = serverConn.getObjectInfo(objectName);
            ObjectAttributeInfo[] objAttrInfo = objInfo.getAttributes();
            List objAttrInfoList = mbeanService.filterAttributes(
                    Utils.getServiceContext(context),
                    objectName,
                    objAttrInfo,
                    form.getDataTypes());
            mbeanAttributesListMap.put(mbeans[i],objAttrInfoList);
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

                                 HttpServletRequest request,
                                 HttpServletResponse response)
            throws Exception {

        AttributeSelectionForm form = (AttributeSelectionForm)actionForm;
        MBeanService mbeanService = ServiceFactory.getMBeanService();
        Map domainToObjectNameListMap = mbeanService.queryMBeansOutputMap
                        (Utils.getServiceContext(context),form.getObjectName(),
                                request.getParameterValues(RequestParams.DATA_TYPE),
                                request.getParameter(RequestParams.APPLY_ATTRIB_FILTER));
        request.setAttribute("domainToObjectNameListMap", domainToObjectNameListMap);
        /*set current page for navigation*/
 
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

        if(expression.getAppName() == null || expression.getMBeanName() == null){
            usage();
            return false;
        }

        MBeanService service = ServiceFactory.getMBeanService();
        ObjectInfo objectInfo =
                service.getMBeanInfo(context.getServiceContext(
                        expression.getAppName(), expression.getMBeanName()));
        printObjectInfo(objectInfo);
        return true;
    }
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

            return false;
        }

        Expression expression = new Expression(args[0]);
        /* get the values */
        MBeanService service = ServiceFactory.getMBeanService();

        String[] attributeNames = null;
        if(args.length > 1){
            attributeNames = new String[args.length - 1];
            for(int i=0; i< attributeNames.length; i++){
                attributeNames[i] = args[i+1];
            }
        }
        ServiceContext serviceContext =
                context.getServiceContext(expression.getAppName(),
                            expression.getMBeanName());
        AttributeListData[] attributeValues = null;
        if(attributeNames != null){
            attributeValues = service.getAttributes(serviceContext,
                    attributeNames, true);
        }else{
            attributeValues = service.getAttributes(serviceContext);
        }
        CommandUtils.printAttributeLists(attributeValues);
        return true;
    }
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

                    AlertSourceConfig.SOURCE_TYPE_GAUGE_MONITOR) ||sourceType.equals(
                    AlertSourceConfig.SOURCE_TYPE_STRING_MONITOR) ){
                expression = new Expression(null, alertSrcConfig.getObjectName(),
                        alertSrcConfig.getAttributeName());
                request.setAttribute("attribute", alertSrcConfig.getAttributeName());
                MBeanService mbeanService = ServiceFactory.getMBeanService();
                ObjectAttribute objAttr = mbeanService.getObjectAttribute(
                    Utils.getServiceContext(context, expression),
                    expression.getTargetName());
                request.setAttribute("currentAttrValue",
                        objAttr.getDisplayValue());
                if(sourceType.equals(
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

            }
            attributes.add(expression.getTargetName());
        }

        /* now get the values */
        MBeanService service = ServiceFactory.getMBeanService();
        for(Iterator it=appMBeanToAttributesMap.keySet().iterator(); it.hasNext();){
            AppMBeanKey key = (AppMBeanKey)it.next();
            List<String> attributes = appMBeanToAttributesMap.get(key);
            AttributeListData[] attributeValues =
                    service.getAttributes(
                            context.getServiceContext(key.appName, key.mbeanName),
                            StringUtils.listToStringArray(attributes),
                            false);
            print(attributeValues);
        }
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

        String filter = null;
        if(args.length > 1){
            filter = args[1];
        }

        MBeanService mbeanService = ServiceFactory.getMBeanService();
        List<MBeanData> mbeanDataList =
                mbeanService.queryMBeans(context.getServiceContext(appName),
                        filter);
        assert mbeanDataList != null;
        CommandUtils.printMBeans(mbeanDataList);
        return true;
    }
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.