Package javax.management

Examples of javax.management.MBeanParameterInfo


        assertEquals(expectedAttributes, actualAttributes);
        assertEquals(expectedAttributesValue, actualAttributesValue);

        // Grab pool mbean operations
        MBeanParameterInfo[] operations = {
                new MBeanParameterInfo("excludeRegex", "java.lang.String", "\"\""),
                new MBeanParameterInfo("includeRegex", "java.lang.String", "\"\"")};
        List<MBeanOperationInfo> expectedOperations = new ArrayList<MBeanOperationInfo>();
        expectedOperations.add(new MBeanOperationInfo(
                "FilterAttributes",
                "Filters the attributes that show up in the MBeanInfo.  The exclude is applied first, then any attributes that match the include are re-added.  It may be required to disconnect and reconnect the JMX console to force a refresh of the MBeanInfo",
                operations, "void", MBeanOperationInfo.UNKNOWN));
View Full Code Here


        assertEquals(expectedAttributes, actualAttributes);
        assertEquals(expectedValues, actualValues);

        // Grab invocation mbean operations
        MBeanParameterInfo[] invocationParameters1 = {
                new MBeanParameterInfo("excludeRegex", "java.lang.String", "\"\""),
                new MBeanParameterInfo("includeRegex", "java.lang.String", "\"\"")};
        MBeanParameterInfo[] invocationParameters2 = {
                new MBeanParameterInfo("p1", "int", "")};

        List<MBeanOperationInfo> expectedOperations = new ArrayList<MBeanOperationInfo>();
        expectedOperations.add(new MBeanOperationInfo(
                "FilterAttributes",
                "Filters the attributes that show up in the MBeanInfo.  The exclude is applied first, then any attributes that match the include are re-added.  It may be required to disconnect and reconnect the JMX console to force a refresh of the MBeanInfo",
View Full Code Here

    for (MBeanOperationInfo info : server.getMBeanInfo(objectName).getOperations()) {
      if (info.getName().equals(name) && info.getSignature().length == ca.length) {
        boolean match = true;
        MBeanParameterInfo[] parameters = info.getSignature();
        for (int a=0; a<ca.length; a++) {
          MBeanParameterInfo parameter = parameters[a];
          Class type = ReflectionUtil.getClass(parameter.getType());
          ca[a] = type.getName();
          if (args[a] == null) {
            if (type.isPrimitive()) { match = false; break; }
          } else {
            if (!type.isInstance(args[a])) { match = false; break; }
View Full Code Here

     * @param index
     * @param name
     * @param description
     */
    public void setDescription(int index, String name,String description){
        MBeanParameterInfo old = infos[index];
        infos[index] = new MBeanParameterInfo(name,old.getType(),description);
    }
View Full Code Here

      else if (MBeanParameterInfoSer.DESCRIPTION.equals(hint)) description = (String)value;
   }

   protected Object createObject() throws SAXException
   {
      return new MBeanParameterInfo(name, className, description);
   }
View Full Code Here

               if (signature.length == params.length)
               {
                  boolean match = true;
                  for (int j = 0; j < params.length; ++j)
                  {
                     MBeanParameterInfo param = params[j];
                     if (!signature[j].equals(param.getType()))
                     {
                        match = false;
                        break;
                     }
                  }
View Full Code Here

            for (int k = 0; k < paramsNumber; ++k)
            {
               Class param = params[k];
               String paramName = description == null ? null : description.getOperationParameterName(method, k);
               String paramDescr = description == null ? null : description.getOperationParameterDescription(method, k);
               paramsInfo[k] = new MBeanParameterInfo(paramName, param.getName(), paramDescr);
            }
            MBeanOperationInfo info = new MBeanOperationInfo(method.getName(), descr, paramsInfo, method.getReturnType().getName(), MBeanOperationInfo.UNKNOWN);
            operations.add(info);
         }
      }
View Full Code Here

         for (int j = 0; j < paramsNumber; ++j)
         {
            Class param = params[j];
            String paramName = descrs == null ? null : descrs.getConstructorParameterName(constructor, j);
            String paramDescr = descrs == null ? null : descrs.getConstructorParameterDescription(constructor, j);
            paramsInfo[j] = new MBeanParameterInfo(paramName, param.getName(), paramDescr);
         }

         String ctorName = constructor.getName();
         MBeanConstructorInfo info = new MBeanConstructorInfo(ctorName, descr, paramsInfo);
         constructors[i] = info;
View Full Code Here

            if (params.length != parameters.length) continue;

            String[] signature = new String[parameters.length];
            for (int j = 0; j < signature.length; ++j)
            {
               MBeanParameterInfo param = parameters[j];
               if (param == null)
                  signature[j] = null;
               else
                  signature[j] = param.getType();
            }

            if (Utils.arrayEquals(params, signature))
            {
               // Found the right operation
View Full Code Here

    public void testCanInvokeMBean() throws Exception {
        final ObjectName on = ObjectName.getInstance("foo.bar:type=Test");
        final ObjectName on2 = ObjectName.getInstance("foo.bar:type=Toast");

        MBeanParameterInfo[] sig = new MBeanParameterInfo[]{new MBeanParameterInfo("arg1", "java.lang.String", "")};
        MBeanOperationInfo op = new MBeanOperationInfo("doit", "", sig, "int", MBeanOperationInfo.INFO);

        MBeanInfo info = EasyMock.createMock(MBeanInfo.class);
        EasyMock.expect(info.getOperations()).andReturn(new MBeanOperationInfo[]{op}).anyTimes();
        EasyMock.expect(info.getAttributes()).andReturn(new MBeanAttributeInfo[]{}).anyTimes();
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.