Examples of MBeanService


Examples of org.jmanage.core.services.MBeanService

        final String[] params = new String[signature.length];
        for(int index =0; index < signature.length; index++){
            params[index] = properties.get(PARAM + (index + 1));
        }
       
        MBeanService mbeanService = ServiceFactory.getMBeanService();
        ServiceContext srvcContext = context.getWebContext().getServiceContext();
        OperationResultData[] operationResult =
            mbeanService.invoke(srvcContext, objectName, operation, params, signature);
        assert operationResult.length == 1;
        assert !operationResult[0].isError();
        output.append("<pre class=\"plaintext\">" + operationResult[0].getDisplayOutput() + "</pre>");
    }
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

            return false;
        }

        Expression expression = new Expression(args[0]);
        /* set the values */
        MBeanService service = ServiceFactory.getMBeanService();
        String[][] attributes = getAttributes(args);
        AttributeListData[] attrListData =
                service.setAttributes(
                        context.getServiceContext(expression.getAppName(),
                                expression.getMBeanName()),
                        attributes);
        Out.println();
        Out.println("Changed Attributes:");
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

        String[] params = new String[args.length - 1];
        for(int i=0; i<params.length; i++){
            params[i] = args[i+1];
        }
        /* execute the operation */
        MBeanService service = ServiceFactory.getMBeanService();
        ServiceContext serviceContext = context.getServiceContext(expression.getAppName(),
                        expression.getMBeanName());
        OperationResultData[] resultData =
                service.invoke(serviceContext,
                        expression.getTargetName(),
                        params);

        for(int i=0; i<resultData.length; i++){
            Out.println();
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

            return false;
        }

        Expression expression = new Expression(args[0]);
        /* set the values */
        MBeanService service = ServiceFactory.getMBeanService();
        String[][] attributes = getAttributes(args);
        if(logger.isLoggable(Level.FINE)){
            logger.log(Level.FINE, "Setting attr. name=" + attributes[0][0] +
                    " value=" + attributes[0][1]);
        }
        AttributeListData[] attrListData =
                service.setAttributes(
                        context.getServiceContext(expression.getAppName(),
                                expression.getMBeanName()),
                        attributes);
        Out.println();
        Out.println("Changed Attributes:");
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

                    request.getParameter(operationName + paramIndex + "_value");
            signature[paramIndex] =
                    request.getParameter(operationName + paramIndex + "_type");
        }

        MBeanService service = ServiceFactory.getMBeanService();
        ObjectOperationInfo operationInfo = service.getOperationInfo(
                Utils.getServiceContext(context),
                operationName, signature);
        OperationResultData[] resultData =
                service.invoke(Utils.getServiceContext(context),
                        operationName,
                        params, signature);
        request.setAttribute("operationResultData", resultData);
        request.setAttribute("operationInfo", operationInfo);
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

            throws Exception {

        MBeanQueryForm queryForm = (MBeanQueryForm)actionForm;
        final String queryObjectName = queryForm.getObjectName();
       
        MBeanService mbeanService = ServiceFactory.getMBeanService();
        List mbeanDataList = mbeanService.queryMBeans(Utils.getServiceContext(context),
                queryObjectName);

        Map<String, Set<String>> domainToObjectNameListMap = new TreeMap<String, Set<String>>();
        ObjectNameTuple tuple = new ObjectNameTuple();
        for(Iterator it=mbeanDataList.iterator(); it.hasNext();){
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

        assert attributes != null;
        List exprList = parse(attributes);
        Map<String, ObjectAttribute> attrMap = new HashMap<String, ObjectAttribute>();
        Map<String, ObjectAttribute> wholeAttrMap = new HashMap<String, 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();
            }
View Full Code Here

Examples of org.jmanage.core.services.MBeanService

                                 ActionForm actionForm,
                                 HttpServletRequest request,
                                 HttpServletResponse response)
            throws Exception {

        MBeanService mbeanService = ServiceFactory.getMBeanService();
        AttributeListData[] attrListData =
                mbeanService.setAttributes(Utils.getServiceContext(context),
                        request.getParameterMap());
        StringBuffer erroneousApps = new StringBuffer();
        for(int i=0; i<attrListData.length; i++){
            if(attrListData[i].isError()){
                if(erroneousApps.length() > 0){
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.