Examples of MBeanConstructorInfo


Examples of javax.management.MBeanConstructorInfo

         }
      }
      if (model.getConstructors() != null)
      {
         // cannot assume they are already ModelMBeanConstructorInfo
         MBeanConstructorInfo constructors[] = model.getConstructors();
         modelMBeanConstructors = new ModelMBeanConstructorInfo[constructors.length];
         for (int i = 0; i < constructors.length; i++)
         {
            MBeanConstructorInfo constructor = constructors[i];
            if (constructor instanceof ModelMBeanConstructorInfo)
               modelMBeanConstructors[i] = new ModelMBeanConstructorInfo((ModelMBeanConstructorInfo)constructor);
            else
               modelMBeanConstructors[i] = new ModelMBeanConstructorInfo(constructor.getName(), constructor.getDescription(), constructor.getSignature());
         }
      }
      if (model.getOperations() != null)
      {
         // cannot assume they are already ModelMBeanOperationInfo
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

        // Create the associated ModelMBeanInfo
        ModelMBeanInfo info = http.createMBeanInfo();
        assertNotNull("Found HttpConnector ModelMBeanInfo", info);

        // Retrieve the relevant MBeanConstructorInfo array
        MBeanConstructorInfo mcinfo[] = info.getConstructors();
        assertNotNull("Found HttpConnector MBeanConstructorInfo array", mcinfo);
        assertEquals("Found HttpConnector MBeanConstructorInfo entry",
                     1, mcinfo.length);

        // Cast first entry to ModelMBeanConstructorInfo
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

  }

  private
  void buildDynamicMBeanInfo() throws IntrospectionException {
    Constructor[] constructors = this.getClass().getConstructors();
    dConstructors[0] = new MBeanConstructorInfo(
             "AppenderDynamicMBean(): Constructs a AppenderDynamicMBean instance",
       constructors[0]);


    BeanInfo bi = Introspector.getBeanInfo(appender.getClass());
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

  }

  private
  void buildDynamicMBeanInfo() {
    Constructor[] constructors = this.getClass().getConstructors();
    dConstructors[0] = new MBeanConstructorInfo(
             "HierarchyDynamicMBean(): Constructs a HierarchyDynamicMBean instance",
       constructors[0]);

    dAttributes.add(new MBeanAttributeInfo("name",
             "java.lang.String",
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

  }

  private
  void buildDynamicMBeanInfo() {
    Constructor[] constructors = this.getClass().getConstructors();
    dConstructors[0] = new MBeanConstructorInfo(
         "HierarchyDynamicMBean(): Constructs a HierarchyDynamicMBean instance",
   constructors[0]);

    vAttributes.add(new MBeanAttributeInfo(THRESHOLD,
             "java.lang.String",
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

  }

  private
  void buildDynamicMBeanInfo() throws IntrospectionException {
    Constructor[] constructors = this.getClass().getConstructors();
    dConstructors[0] = new MBeanConstructorInfo(
             "LayoutDynamicMBean(): Constructs a LayoutDynamicMBean instance",
       constructors[0]);


    BeanInfo bi = Introspector.getBeanInfo(layout.getClass());
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

      return new MBeanAttributeInfo("name", "boolean", "description", true, true, true);
   }

   public MBeanConstructorInfo createMBeanConstructorInfo()
   {
      return new MBeanConstructorInfo("name", "description", new MBeanParameterInfo[]{createMBeanParameterInfo()});
   }
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

         new MBeanAttributeInfo(
         "name", "type", "description", true, true, false)
      };
      MBeanConstructorInfo[] constructors = new MBeanConstructorInfo[]
      {
         new MBeanConstructorInfo(
         "name", "description", parms)
      };
      MBeanOperationInfo[] operations = new MBeanOperationInfo[]
      {
         new MBeanOperationInfo(
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

         new MBeanAttributeInfo(
         "name", "type", "description", true, true, false)
      };
      MBeanConstructorInfo[] constructors = new MBeanConstructorInfo[]
      {
         new MBeanConstructorInfo(
         "name", "description", parms)
      };
      MBeanOperationInfo[] operations = new MBeanOperationInfo[]
      {
         new MBeanOperationInfo(
         "name", "description", parms,
         "type", MBeanOperationInfo.ACTION_INFO)
      };
      MBeanNotificationInfo[] notifications = new MBeanNotificationInfo[]
      {
         new MBeanNotificationInfo(new String[] { "type1", "type" }, "name", "description")
      };
      MBeanInfo info = new MBeanInfo(
         "name", "description", attributes, constructors,
         operations, notifications);

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

      MBeanInfo info2 = new MBeanInfo(
         "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 MBeanInfo(
         "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 MBeanInfo(
         "name", "description2", attributes, constructors,
         operations, notifications);
      assertTrue("Instances with different descriptions are not equal", info.equals(info2) == false);
      assertTrue("Instances with different descriptions are not equal", info2.equals(info) == false);

      MBeanAttributeInfo[] attributes2 = new MBeanAttributeInfo[]
      {
         new MBeanAttributeInfo(
         "name2", "type", "description", true, true, false)
      };

      info2 = new MBeanInfo(
         "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 MBeanAttributeInfo[]
      {
         new MBeanAttributeInfo(
         "name2", "type", "description", true, true, false),
         new MBeanAttributeInfo(
         "name3", "type", "description", true, true, false)
      };

      info2 = new MBeanInfo(
         "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 MBeanInfo(
         "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);

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

      info2 = new MBeanInfo(
         "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 MBeanConstructorInfo[]
      {
         new MBeanConstructorInfo(
         "name2", "description", parms),
         new MBeanConstructorInfo(
         "name3", "description", parms)
      };

      info2 = new MBeanInfo(
         "name", "description", attributes, constructors2,
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

         new MBeanAttributeInfo(
         "name", "type", "description", true, true, false)
      };
      MBeanConstructorInfo[] constructors = new MBeanConstructorInfo[]
      {
         new MBeanConstructorInfo(
         "name", "description", parms)
      };
      MBeanOperationInfo[] operations = new MBeanOperationInfo[]
      {
         new MBeanOperationInfo(
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.