Examples of MBeanConstructorInfo


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

   // Tests ---------------------------------------------------------------------

   public void testMBeanConstructorInfo()
      throws Exception
   {
      MBeanConstructorInfo info = new MBeanConstructorInfo(
         "name", "description", params1);
      assertEquals("name", info.getName());
      assertEquals("description", info.getDescription());
      assertEquals(Arrays.asList(params1), Arrays.asList(info.getSignature()));
   }
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

   }

   public void testHashCode()
      throws Exception
   {
      MBeanConstructorInfo info1 = new MBeanConstructorInfo("name", "description", params1);
      MBeanConstructorInfo info2 = new MBeanConstructorInfo("name", "description", params1);

      assertTrue("Different instances with the same hashcode are equal", info1.hashCode() == info2.hashCode());
   }
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

   }

   public void testEquals()
      throws Exception
   {
      MBeanConstructorInfo info = new MBeanConstructorInfo(
         "name", "description", params1);

      assertTrue("Null should not be equal", info.equals(null) == false);
      assertTrue("Only MBeanConstructorInfo should be equal", info.equals(new Object()) == false);

      MBeanConstructorInfo info2 = new MBeanConstructorInfo(
         "name", "description", params1);

      assertTrue("Different instances of the same data are equal", info.equals(info2));
      assertTrue("Different instances of the same data are equal", info2.equals(info));

      info2 = new MBeanConstructorInfo(
         "name", "description2", params1);

      assertTrue("Different instances with different descriptions are not equal", info.equals(info2) == false);
      assertTrue("Different instances with different descritpions are not equal", info2.equals(info) == false);

      info2 = new MBeanConstructorInfo(
         "name2", "description", params1);

      assertTrue("Instances with different names are not equal", info.equals(info2) == false);
      assertTrue("Instances with different names are not equal", info2.equals(info) == false);

      info2 = new MBeanConstructorInfo(
         "name", "description", params2);

      assertTrue("Instances with different types are not equal", info.equals(info2) == false);
      assertTrue("Instances with different types are not equal", info2.equals(info) == false);
   }
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

   }

   public void testSerialization()
      throws Exception
   {
      MBeanConstructorInfo info = new MBeanConstructorInfo(
         "name", "description", params1);

      // Serialize it
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

      // constructors
      if (ctors.length > 0)
      {
         for (int i = 0; i < ctors.length; i++)
         {
            MBeanConstructorInfo ctorInfo = ctors[i];
            out.println("   <constructor>");
            out.println("      <description>" + ctorInfo.getDescription() + "</description>");
            out.println("      <name>" + ctorInfo.getName() + "</name>");
            outputParameters(out, ctorInfo.getSignature());
            out.println("   </constructor>");
         }
         out.println();
      }
     
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

    private static MBeanConstructorInfo[] findConstructors(Class<?> c) {
        Constructor<?>[] cons = c.getConstructors();
        MBeanConstructorInfo[] mbc = new MBeanConstructorInfo[cons.length];
        for (int i = 0; i < cons.length; i++) {
            final String descr = "Public constructor of the MBean";
            mbc[i] = new MBeanConstructorInfo(descr, cons[i]);
        }
        return mbc;
    }
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

   public void testValidConstructor()
   {
      MBeanConstructorInfo[] constructors = info.getConstructors();

      MBeanConstructorInfo foundConstructor= null;

      for (int i = 0; i < constructors.length; i++)
      {
            if (signatureString.equals(InfoUtil.makeSignatureString(constructors[i].getSignature())))
            {
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

      System.out.println("");
      System.out.println("Constructors:");
      for (int i = 0; i < constructors.length; i++)
      {
         StringBuffer dump = new StringBuffer();
         MBeanConstructorInfo constructor = constructors[i];
         dump.append("name=").append(constructor.getName());
         dump.append(",signature=").append(makeSignatureString(constructor.getSignature()));

         System.out.println(dump);
      }
   }
View Full Code Here

Examples of javax.management.MBeanConstructorInfo

   public void testValidConstructor()
   {
      MBeanConstructorInfo[] constructors = info.getConstructors();

      MBeanConstructorInfo foundConstructor= null;

      for (int i = 0; i < constructors.length; i++)
      {
            if (signatureString.equals(InfoUtil.makeSignatureString(constructors[i].getSignature())))
            {
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.