Package javax.management.modelmbean

Examples of javax.management.modelmbean.ModelMBeanConstructorInfo


        assertNotNull("Found HttpConnector MBeanConstructorInfo array", mcinfo);
        assertEquals("Found HttpConnector MBeanConstructorInfo entry",
                     1, mcinfo.length);

        // Cast first entry to ModelMBeanConstructorInfo
        ModelMBeanConstructorInfo mmcinfo =
            (ModelMBeanConstructorInfo) mcinfo[0];

        // Get the Descriptor
        Descriptor desc = mmcinfo.getDescriptor();
        assertNotNull("Found HttpConnector constructor descriptor", desc);

        // Check the configured fields
        checkDescriptor(desc, "role", "constructor");
        checkDescriptor(desc, "field1", "HttpConnector.constructor/field1");
View Full Code Here


   public ModelMBeanConstructorInfo createModelMBeanConstructorInfo()
   {
      String[] names = new String[]{"name", "descriptortype", "role", "displayname"/*, "lastReturnedTimeStamp"*/};
      Object[] values = new Object[]{"name", "operation", "constructor", "name"/*, "0"*/};
      DescriptorSupport descriptor = new DescriptorSupport(names, values);
      return new ModelMBeanConstructorInfo("name", "description", new MBeanParameterInfo[]{createMBeanParameterInfo()}, descriptor);
   }
View Full Code Here

            String.class.getName(),
            "Another attribute description",
            !READABLE, !WRITABLE, !ISIS
      );
     
      ModelMBeanConstructorInfo constr1 = new ModelMBeanConstructorInfo(
            "FirstConstructor",
            "Description of the first constructor",
            null
      );
     
      ModelMBeanConstructorInfo constr2 = new ModelMBeanConstructorInfo(
            "SecondConstructor",
            "Description of the second constructor",
            null
      );
     
      ModelMBeanConstructorInfo constr3 = new ModelMBeanConstructorInfo(
            "ThirdConstructor",
            "Description of the 3rd constructor",
            null
      );
     
View Full Code Here

            String.class.getName(),
            "Another attribute description",
            !READABLE, !WRITABLE, !ISIS
      );
     
      ModelMBeanConstructorInfo constr1 = new ModelMBeanConstructorInfo(
            "FirstConstructor",
            "Description of the first constructor",
            null
      );
     
      ModelMBeanConstructorInfo constr2 = new ModelMBeanConstructorInfo(
            "SecondConstructor",
            "Description of the second constructor",
            null
      );
     
      ModelMBeanConstructorInfo constr3 = new ModelMBeanConstructorInfo(
            "ThirdConstructor",
            "Description of the 3rd constructor",
            null
      );
     
View Full Code Here

            String.class.getName(),
            "Another attribute description",
            !READABLE, !WRITABLE, !ISIS
      );
     
      ModelMBeanConstructorInfo constr1 = new ModelMBeanConstructorInfo(
            "FirstConstructor",
            "Description of the first constructor",
            null
      );
     
      ModelMBeanConstructorInfo constr2 = new ModelMBeanConstructorInfo(
            "SecondConstructor",
            "Description of the second constructor",
            null
      );
     
      ModelMBeanConstructorInfo constr3 = new ModelMBeanConstructorInfo(
            "ThirdConstructor",
            "Description of the 3rd constructor",
            null
      );
     
View Full Code Here

      Constructor bobctor =
              ModelMBeanConstructorInfoTest.Bob.class.getConstructor(new Class[]{String.class});
      String[] fields = {"name", "descriptorType", "role"};
      String[] values = {bobctor.getName(), "operation", "constructor"};
      DescriptorSupport ds = new DescriptorSupport(fields, values);
      ModelMBeanConstructorInfo ctorinfo =
              new ModelMBeanConstructorInfo("BobBuilder", bobctor, ds);
      Descriptor d = ctorinfo.getDescriptor();
      String dispname = (String)d.getFieldValue("displayName");
      assertTrue("Unexpected displayName",
                 dispname.compareTo(bobctor.getName()) == 0);
   }
View Full Code Here

         String[] fields =
                 {"name", "descriptorType", "displayName", "role"};
         String[] values =
                 {bobctor.getName(), "operation", "bob maker", "getter"};
         DescriptorSupport ds = new DescriptorSupport(fields, values);
         ModelMBeanConstructorInfo ctorinfo =
                 new ModelMBeanConstructorInfo("BobBuilder", bobctor, ds);
         fail("Expecting RuntimeOperationsException");
      }
      catch (RuntimeOperationsException x)
      {
         if (!(x.getTargetException() instanceof IllegalArgumentException))
View Full Code Here

              new DescriptorSupport(new String[]{
                 "descriptorType=OPERATION",
                 "role=constructor",
                 "name=BobBuilder",
                 "displayname=bob maker"});
      ModelMBeanConstructorInfo ctorinfo =
              new ModelMBeanConstructorInfo("BobBuilder",
                                            "Default Bob Constructor",
                                            new MBeanParameterInfo[0],
                                            ds);
   }
View Full Code Here

   public void compareModelMBeanConstructorInfo(Object o1, Object o2)
   {
      compareMBeanConstructorInfo(o1, o2);

      ModelMBeanConstructorInfo a1 = (ModelMBeanConstructorInfo)o1;
      ModelMBeanConstructorInfo a2 = (ModelMBeanConstructorInfo)o2;
      compareDescriptorSupport(a1.getDescriptor(), a2.getDescriptor());
   }
View Full Code Here

            new ModelMBeanAttributeInfo[attrs.length];
        for (int i = 0; i < attrs.length; i++)
            attributes[i] = attrs[i].createAttributeInfo();
       
        ConstructorInfo consts[] = getConstructors();
        ModelMBeanConstructorInfo constructors[] =
            new ModelMBeanConstructorInfo[consts.length];
        for (int i = 0; i < consts.length; i++)
            constructors[i] = consts[i].createConstructorInfo();
        NotificationInfo notifs[] = getNotifications();
        ModelMBeanNotificationInfo notifications[] =
View Full Code Here

TOP

Related Classes of javax.management.modelmbean.ModelMBeanConstructorInfo

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.