Package javax.management

Examples of javax.management.MBeanFeatureInfo


    */
   public void testConstructor()
   {
      try
      {
         MBeanFeatureInfo info = new MBeanFeatureInfo("Name", "This is a description.");
        
         assertTrue(info.getName().equals("Name"));
         assertTrue(info.getDescription().equals("This is a description."));
      }
      catch (AssertionFailedError e)
      {
         throw e;
      }
View Full Code Here


   {
      if (features != null)
      {
         for (int i = 0; i < features.length; ++i)
         {
            MBeanFeatureInfo feature = features[i];
            if (feature != null && feature.getName().equals(name) && feature instanceof DescriptorAccess)
            {
               return ((DescriptorAccess)feature).getDescriptor();
            }
         }
      }
View Full Code Here

    */
   public void testConstructor()
   {
      try
      {
         MBeanFeatureInfo info = new MBeanFeatureInfo("Name", "This is a description.");
        
         assertTrue(info.getName().equals("Name"));
         assertTrue(info.getDescription().equals("This is a description."));
      }
      catch (AssertionFailedError e)
      {
         throw e;
      }
View Full Code Here

   }

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

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

   }

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

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

      MBeanFeatureInfo info2 = new MBeanFeatureInfo("name", "description");

      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 MBeanFeatureInfo("name2", "description");

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

      info2 = new MBeanFeatureInfo("name", "description2");

      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);
   }
View Full Code Here

   {
      if (features != null)
      {
         for (int i = 0; i < features.length; ++i)
         {
            MBeanFeatureInfo feature = features[i];
            if (feature != null && feature.getName().equals(name) && feature instanceof DescriptorAccess)
            {
               return ((DescriptorAccess)feature).getDescriptor();
            }
         }
      }
View Full Code Here

      compareException(xx1, xx2);
   }

   public void compareMBeanFeatureInfo(Object o1, Object o2)
   {
      MBeanFeatureInfo f1 = (MBeanFeatureInfo)o1;
      MBeanFeatureInfo f2 = (MBeanFeatureInfo)o2;

      if (!f1.getName().equals(f2.getName())) throw new RuntimeException();
      if (!f1.getDescription().equals(f2.getDescription())) throw new RuntimeException();
   }
View Full Code Here

TOP

Related Classes of javax.management.MBeanFeatureInfo

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.