Examples of OpenMBeanOperationInfoSupport


Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

            OpenMBeanParameterInfo[] newParams = new OpenMBeanParameterInfo[params.length + 1];
            newParams[0] = addWildcardChildName;
            System.arraycopy(params, 0, newParams, 1, params.length);
            params = newParams;
        }
        return new OpenMBeanOperationInfoSupport(
                name,
                getDescription(opNode),
                params,
                getReturnType(opNode),
                MBeanOperationInfo.UNKNOWN);
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

            OpenMBeanParameterInfo[] newParams = new OpenMBeanParameterInfo[params.length + 1];
            newParams[0] = addWildcardChildName;
            System.arraycopy(params, 0, newParams, 1, params.length);
            params = newParams;
        }
        return new OpenMBeanOperationInfoSupport(
                name,
                getDescription(opNode),
                params,
                getReturnType(opNode),
                MBeanOperationInfo.UNKNOWN);
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

            constructors[0] = new OpenMBeanConstructorInfoSupport( "KnowledgeBaseMonitoringMXBean",
                                                                   "Constructs a KnowledgeBaseMonitoringMXBean instance.",
                                                                   new OpenMBeanParameterInfoSupport[0] );
            //Operations
            OpenMBeanParameterInfo[] params = new OpenMBeanParameterInfoSupport[0];
            operations[0] = new OpenMBeanOperationInfoSupport( OP_START_INTERNAL_MBEANS,
                                                               "Creates, registers and starts all the dependent MBeans that allow monitor all the details in this KnowledgeBase.",
                                                               params,
                                                               SimpleType.VOID,
                                                               MBeanOperationInfo.INFO );
            operations[1] = new OpenMBeanOperationInfoSupport( OP_STOP_INTERNAL_MBEANS,
                                                               "Stops and disposes all the dependent MBeans that allow monitor all the details in this KnowledgeBase.",
                                                               params,
                                                               SimpleType.VOID,
                                                               MBeanOperationInfo.INFO );
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

            constructors[0] = new OpenMBeanConstructorInfoSupport( "KnowledgeBaseMonitoringMXBean",
                                                                   "Constructs a KnowledgeBaseMonitoringMXBean instance.",
                                                                   new OpenMBeanParameterInfoSupport[0] );
            //Operations
            OpenMBeanParameterInfo[] params = new OpenMBeanParameterInfoSupport[0];
            operations[0] = new OpenMBeanOperationInfoSupport( OP_START_INTERNAL_MBEANS,
                                                               "Creates, registers and starts all the dependent MBeans that allow monitor all the details in this KnowledgeBase.",
                                                               params,
                                                               SimpleType.VOID,
                                                               MBeanOperationInfo.INFO );
            operations[1] = new OpenMBeanOperationInfoSupport( OP_STOP_INTERNAL_MBEANS,
                                                               "Stops and disposes all the dependent MBeans that allow monitor all the details in this KnowledgeBase.",
                                                               params,
                                                               SimpleType.VOID,
                                                               MBeanOperationInfo.INFO );
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

         new OpenMBeanConstructorInfoSupport(
         "name", "description", parms)
      };
      OpenMBeanOperationInfoSupport[] operations = new OpenMBeanOperationInfoSupport[]
      {
         new OpenMBeanOperationInfoSupport(
         "name", "description", parms,
         SimpleType.STRING, OpenMBeanOperationInfoSupport.ACTION_INFO)
      };
      MBeanNotificationInfo[] notifications = new MBeanNotificationInfo[]
      {
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

         new OpenMBeanConstructorInfoSupport(
         "name", "description", parms)
      };
      OpenMBeanOperationInfoSupport[] operations = new OpenMBeanOperationInfoSupport[]
      {
         new OpenMBeanOperationInfoSupport(
         "name", "description", parms,
         SimpleType.STRING, OpenMBeanOperationInfoSupport.ACTION_INFO)
      };
      MBeanNotificationInfo[] notifications = new MBeanNotificationInfo[]
      {
         new MBeanNotificationInfo(new String[] { "type1", "type" }, "name", "description")
      };
      OpenMBeanInfoSupport info = new OpenMBeanInfoSupport(
         "name", "description", attributes, constructors,
         operations, notifications);

      assertTrue("Null is not equal to any instance", info.equals(null) == false);
      assertTrue("Instance is only equal another OpenMBeanInfo instance", info.equals(new Object()) == false);
      assertTrue("Instance should equal itself", info.equals(info));

      OpenMBeanInfoSupport info2 = new OpenMBeanInfoSupport(
         "name", "description", attributes, constructors,
         operations, notifications);
      assertTrue("Instances with same values should be equal", info.equals(info2));
      assertTrue("Instances with same values should be equal", info2.equals(info));

      info2 = new OpenMBeanInfoSupport(
         "name2", "description", attributes, constructors,
         operations, notifications);
      assertTrue("Instances with different class names are not equal", info.equals(info2) == false);
      assertTrue("Instances with different class names are not equal", info2.equals(info) == false);

      info2 = new OpenMBeanInfoSupport(
         "name", "description2", attributes, constructors,
         operations, notifications);
      assertTrue("Instances with different descriptions are equal", info.equals(info2));
      assertTrue("Instances with different descriptions are equal", info2.equals(info));

      OpenMBeanAttributeInfoSupport[] attributes2 = new OpenMBeanAttributeInfoSupport[]
      {
         new OpenMBeanAttributeInfoSupport(
         "name2", "description", SimpleType.STRING, true, true, false)
      };

      info2 = new OpenMBeanInfoSupport(
         "name", "description", attributes2, constructors,
         operations, notifications);
      assertTrue("Instances with different attributes are not equal", info.equals(info2) == false);
      assertTrue("Instances with different attributes are not equal", info2.equals(info) == false);

      attributes2 = new OpenMBeanAttributeInfoSupport[]
      {
         new OpenMBeanAttributeInfoSupport(
         "name2", "description", SimpleType.STRING, true, true, false),
         new OpenMBeanAttributeInfoSupport(
         "name3", "description", SimpleType.STRING, true, true, false)
      };

      info2 = new OpenMBeanInfoSupport(
         "name", "description", attributes2, constructors,
         operations, notifications);
      assertTrue("Instances with different numbers of attributes are not equal", info.equals(info2) == false);
      assertTrue("Instances with different numbers of attributes are not equal", info2.equals(info) == false);

      info2 = new OpenMBeanInfoSupport(
         "name", "description", null, constructors,
         operations, notifications);
      assertTrue("Instances with and without attributes are not equal", info.equals(info2) == false);
      assertTrue("Instances with and without attributes are not equal", info2.equals(info) == false);

      OpenMBeanConstructorInfoSupport[] constructors2 = new OpenMBeanConstructorInfoSupport[]
      {
         new OpenMBeanConstructorInfoSupport(
         "name2", "description", parms)
      };

      info2 = new OpenMBeanInfoSupport(
         "name", "description", attributes, constructors2,
         operations, notifications);
      assertTrue("Instances with different constructors are not equal", info.equals(info2) == false);
      assertTrue("Instances with different constructors are not equal", info2.equals(info) == false);

      constructors2 = new OpenMBeanConstructorInfoSupport[]
      {
         new OpenMBeanConstructorInfoSupport(
         "name2", "description", parms),
         new OpenMBeanConstructorInfoSupport(
         "name3", "description", parms)
      };

      info2 = new OpenMBeanInfoSupport(
         "name", "description", attributes, constructors2,
         operations, notifications);
      assertTrue("Instances with different numbers of constructors are not equal", info.equals(info2) == false);
      assertTrue("Instances with different numbers of constructors are not equal", info2.equals(info) == false);

      info2 = new OpenMBeanInfoSupport(
         "name", "description", attributes, null,
         operations, notifications);
      assertTrue("Instances with and without constructors are not equal", info.equals(info2) == false);
      assertTrue("Instances with and without constructors are not equal", info2.equals(info) == false);

      OpenMBeanOperationInfoSupport[] operations2 = new OpenMBeanOperationInfoSupport[]
      {
         new OpenMBeanOperationInfoSupport(
         "name2", "description", parms,
         SimpleType.STRING, OpenMBeanOperationInfoSupport.ACTION_INFO)
      };

      info2 = new OpenMBeanInfoSupport(
         "name", "description", attributes, constructors,
         operations2, notifications);
      assertTrue("Instances with different operations are not equal", info.equals(info2) == false);
      assertTrue("Instances with different operations are not equal", info2.equals(info) == false);

      operations2 = new OpenMBeanOperationInfoSupport[]
      {
         new OpenMBeanOperationInfoSupport(
         "name2", "description", parms,
         SimpleType.STRING, OpenMBeanOperationInfoSupport.ACTION_INFO),
         new OpenMBeanOperationInfoSupport(
         "name3", "description", parms,
         SimpleType.STRING, OpenMBeanOperationInfoSupport.ACTION_INFO)
      };

      info2 = new OpenMBeanInfoSupport(
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

         new OpenMBeanConstructorInfoSupport(
         "name", "description", parms)
      };
      OpenMBeanOperationInfoSupport[] operations = new OpenMBeanOperationInfoSupport[]
      {
         new OpenMBeanOperationInfoSupport(
         "name", "description", parms,
         SimpleType.STRING, OpenMBeanOperationInfoSupport.ACTION_INFO)
      };
      MBeanNotificationInfo[] notifications = new MBeanNotificationInfo[]
      {
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

         new OpenMBeanConstructorInfoSupport(
         "name", "description", parms)
      };
      OpenMBeanOperationInfoSupport[] operations = new OpenMBeanOperationInfoSupport[]
      {
         new OpenMBeanOperationInfoSupport(
         "name", "description", parms,
         SimpleType.STRING, OpenMBeanOperationInfoSupport.ACTION_INFO)
      };
      MBeanNotificationInfo[] notifications = new MBeanNotificationInfo[]
      {
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

         new OpenMBeanConstructorInfoSupport(
         "name", "description", parms)
      };
      OpenMBeanOperationInfoSupport[] operations = new OpenMBeanOperationInfoSupport[]
      {
         new OpenMBeanOperationInfoSupport(
         "name", "description", parms,
         SimpleType.STRING, OpenMBeanOperationInfoSupport.ACTION_INFO)
      };
      MBeanNotificationInfo[] notifications = new MBeanNotificationInfo[]
      {
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

      OpenMBeanParameterInfoSupport[] parms = new OpenMBeanParameterInfoSupport[]
      {
         new OpenMBeanParameterInfoSupport(
            "name", "description", SimpleType.STRING)
      };
      OpenMBeanOperationInfoSupport info = new OpenMBeanOperationInfoSupport(
         "name", "description", parms,
         SimpleType.STRING, OpenMBeanOperationInfoSupport.ACTION_INFO);

      int myHash = "name".hashCode() + Arrays.asList(parms).hashCode()
                   + SimpleType.STRING.hashCode() + OpenMBeanOperationInfoSupport.ACTION_INFO;
      assertEquals(myHash, info.hashCode());
   }
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.