Package javax.management

Examples of javax.management.MBeanParameterInfo


        if (textParams == null || params == null) {
            return null;
        }
        Object[] ret = new Object[textParams.length];
        for (int i = 0; i < ret.length && i < params.length; i++) {
            MBeanParameterInfo param = params[i];
            String texti = textParams[i];
            if (texti.length() == 0) {
                ret[i] = null;
            } else if (param.getType().equals("byte")) { //$NON-NLS-1$
                ret[i] = new Byte(texti);
            } else if (param.getType().equals("short")) {//$NON-NLS-1$
                ret[i] = new Short(texti);
            } else if (param.getType().equals("java.lang.Short")) {//$NON-NLS-1$
                ret[i] = new Short(texti);
            } else if (param.getType().equals("int")) {//$NON-NLS-1$
                ret[i] = new Integer(texti);
            } else if (param.getType().equals("java.lang.Integer")) {//$NON-NLS-1$
                ret[i] = new Integer(texti);
            } else if (param.getType().equals("long")) {//$NON-NLS-1$
                ret[i] = new Long(texti);
            } else if (param.getType().equals("java.lang.Long")) {//$NON-NLS-1$
                ret[i] = new Long(texti);
            } else if (param.getType().equals("float")) {//$NON-NLS-1$
                ret[i] = new Float(texti);
            } else if (param.getType().equals("java.lang.Float")) {//$NON-NLS-1$
                ret[i] = new Float(texti);
            } else if (param.getType().equals("double")) {//$NON-NLS-1$
                ret[i] = new Double(texti);
            } else if (param.getType().equals("java.lang.Double")) {//$NON-NLS-1$
                ret[i] = new Double(texti);
            } else if (param.getType().equals("char")) {//$NON-NLS-1$
                ret[i] = new Character(texti.charAt(0));
            } else if (param.getType().equals("boolean")) {//$NON-NLS-1$
                ret[i] = new Boolean(texti);
            } else if (MBeanUtils.class
                    .getClassLoader()
                    .loadClass("java.lang.Number").isAssignableFrom(MBeanUtils.class.getClassLoader().loadClass(param.getType()))) {//$NON-NLS-1$
                ret[i] = createNumber(texti);
            } else {
                ret[i] = texti;
            }
        }
View Full Code Here


        sig.append('(');
        for (int i = 0; i < params.length; i++) {
            if (i > 0) {
                sig.append(", "); //$NON-NLS-1$
            }
            MBeanParameterInfo param = params[i];
            sig.append(StringUtils.toString(param.getType(), false));
        }
        sig.append(')');
        return sig.toString();
    }
View Full Code Here

            paramsComposite.setLayout(new GridLayout(1, false));
            paramsComposite.setLayoutData(new GridData(SWT.BEGINNING, SWT.BOTTOM,
                    false, false));
            textParams = new Text[params.length];
            for (int j = 0; j < params.length; j++) {
                MBeanParameterInfo param = params[j];
                textParams[j] = new Text(paramsComposite, SWT.SINGLE
                        | SWT.BORDER);
                textParams[j].setText(StringUtils.toString(param.getType()));
                textParams[j].setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM,
                        true, true));
            }
            paramsComposite.pack();
        }
View Full Code Here

        addDescriptor("impact", Messages.impact, Messages.general, descriptors); //$NON-NLS-1$
        addDescriptor(
                "writable", Messages.writable, Messages.general, descriptors); //$NON-NLS-1$
        MBeanParameterInfo[] paramInfos = opInfo.getSignature();
        for (int i = 0; i < paramInfos.length; i++) {
            MBeanParameterInfo paramInfo = paramInfos[i];
            addDescriptor(
                    "param" + i, paramInfo.getName(), Messages.parameters, //$NON-NLS-1$
                    descriptors);
        }
        return descriptors.toArray(new IPropertyDescriptor[descriptors.size()]);
    }
View Full Code Here

            String idStr = (String) id;
            if (idStr.startsWith("param")) { //$NON-NLS-1$
                String indexStr = idStr.substring(idStr.length() - 1);
                int i = new Integer(indexStr).intValue();
                for (int j = 0; j < opInfo.getSignature().length; j++) {
                    MBeanParameterInfo paramInfo = opInfo.getSignature()[j];
                    if (i == j) {
                        return paramInfo.getType();
                    }
                }
            }

        }
View Full Code Here

      if (parameters != null) {

        for (int i = 0; i < parameterTypes.length; i++) {

          parameters[i] = new MBeanParameterInfo(parameterTypes[i].getParameterName(), parameterTypes[i]
              .getParameterType().getCanonicalName(), parameterTypes[i].getParameterDescription());
        }
      }

      // Com todas as informações, criamos nossa instância de MBeanOperationInfo e
View Full Code Here

      {
         MBeanOperationInfo info = new MBeanOperationInfo(
               "MyOperation",
               "This is a description.",
               new MBeanParameterInfo[] {
                        new MBeanParameterInfo("FooParam", "java.lang.Object", "description"),
                        new MBeanParameterInfo("BarParam", "java.lang.String", "description")
               },
               "java.util.StringBuffer",
               MBeanOperationInfo.ACTION_INFO
         );
        
View Full Code Here

      {
         MBeanOperationInfo info1 = new MBeanOperationInfo(
               null,
               "This is a description.",
               new MBeanParameterInfo[] {
                        new MBeanParameterInfo("FooParam", "java.lang.Object", "description"),
                        new MBeanParameterInfo("BarParam", "java.lang.String", "description")
               },
               "java.util.StringBuffer",
               MBeanOperationInfo.ACTION_INFO
         );
        
View Full Code Here

      {
         MBeanOperationInfo info1 = new MBeanOperationInfo(
               "SomeName",
               null,
               new MBeanParameterInfo[] {
                        new MBeanParameterInfo("FooParam", "java.lang.Object", "description"),
                        new MBeanParameterInfo("BarParam", "java.lang.String", "description")
               },
               "java.util.StringBuffer",
               MBeanOperationInfo.ACTION_INFO
         );
        
View Full Code Here

      {
         MBeanOperationInfo info1 = new MBeanOperationInfo(
               "SomeName",
               "some description",
               new MBeanParameterInfo[] {
                        new MBeanParameterInfo("FooParam", "java.lang.Object", "description"),
                        new MBeanParameterInfo("BarParam", "java.lang.String", "description")
               },
               "java.util.StringBuffer",
               -22342
         );
        
View Full Code Here

TOP

Related Classes of javax.management.MBeanParameterInfo

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.