Package javax.management.openmbean

Examples of javax.management.openmbean.OpenMBeanConstructorInfoSupport


   public void testCtorNullDescription() throws Exception
   {
      try
      {
         OpenMBeanConstructorInfoSupport info =
                 new OpenMBeanConstructorInfoSupport("wine", null, signature);
         fail("Expecting IllegalArgumentException");
      }
      catch (IllegalArgumentException x)
      {
         assertTrue(true);
View Full Code Here


   public void testCtorEmptyDescription() throws Exception
   {
      try
      {
         OpenMBeanConstructorInfoSupport info =
                 new OpenMBeanConstructorInfoSupport("wine", "", signature);
         fail("Expecting IllegalArgumentException");
      }
      catch (IllegalArgumentException x)
      {
         assertTrue(true);
View Full Code Here

                 {
                    new MyMBeanParameterInfo(),
                    new MyMBeanParameterInfo(),
                    new MyMBeanParameterInfo()};

         OpenMBeanConstructorInfoSupport info =
                 new OpenMBeanConstructorInfoSupport("wine",
                                                     "Non-default constructor",
                                                     bogusig);
         fail("Expecting ArrayStoreException");
      }
      catch (ArrayStoreException x)
View Full Code Here

   }

   public void testEquals() throws Exception
   {
      OpenMBeanConstructorInfo infoone =
              new OpenMBeanConstructorInfoSupport("wine", "Vino", signature);
      assertTrue("Null infoone constructed", infoone != null);

      OpenMBeanConstructorInfo infotwo =
              new OpenMBeanConstructorInfoSupport("wine",
                                                  "Nectar of the gods",
                                                  signature);
      assertTrue("Null infotwo constructed", infotwo != null);

      assertTrue("Expected equality", infoone.equals(infotwo));

      OpenMBeanConstructorInfo infothree =
              new OpenMBeanConstructorInfoSupport("Vino", "Vino", signature);
      assertTrue("Null infothree constructed", infothree != null);

      assertFalse("Expected inequality based on name",
                  infothree.equals(infoone));

      OpenMBeanConstructorInfo infofour =
              new OpenMBeanConstructorInfoSupport("wine",
                                                  "Vino",
                                                  new OpenMBeanParameterInfoSupport[0]);
      assertTrue("Null infofour constructed", infofour != null);

      assertFalse("Expected inequality based on signature",
                  infofour.equals(infoone));
   }
View Full Code Here

   }

   public void testHashCode() throws Exception
   {
      OpenMBeanConstructorInfo infoone =
              new OpenMBeanConstructorInfoSupport("wine", "Vino", signature);
      assertTrue("Null infoone constructed", infoone != null);

      assertTrue("Unexpected hash code",
                 infoone.hashCode() == hashCode(infoone));

      OpenMBeanConstructorInfo infotwo =
              new OpenMBeanConstructorInfoSupport("wine",
                                                  "Nectar of the gods",
                                                  signature);
      assertTrue("Null infotwo constructed", infotwo != null);

      assertTrue("Expecting equal hash codes",
                 infoone.hashCode() == infotwo.hashCode());
   }
View Full Code Here

                                                   false,
                                                   false)};

      OpenMBeanConstructorInfo[] testctors =
              new OpenMBeanConstructorInfoSupport[]{
                 new OpenMBeanConstructorInfoSupport("CurrencyMBean",
                                                     "create a currency mbean",
                                                     new OpenMBeanParameterInfoSupport[]{
                                                        new OpenMBeanParameterInfoSupport("currencies",
                                                                                          "currencies that may be exchanged",
                                                                                          new ArrayType(1, SimpleType.STRING))})
View Full Code Here

                                           false,
                                           false)};

      ctors =
      new OpenMBeanConstructorInfoSupport[]{
         new OpenMBeanConstructorInfoSupport("CurrencyMBean",
                                             "create a currency mbean",
                                             new OpenMBeanParameterInfoSupport[]{
                                                new OpenMBeanParameterInfoSupport("currencies",
                                                                                  "currencies that may be exchanged",
                                                                                  new ArrayType(1, SimpleType.STRING))})
View Full Code Here

                identicalArrays(signature, ci.getSignature()))
            return ci;
        if (ci instanceof OpenMBeanConstructorInfo) {
            OpenMBeanParameterInfo[] oparams =
                paramsToOpenParams(signature);
            return new OpenMBeanConstructorInfoSupport(ci.getName(),
                                                       description,
                                                       oparams,
                                                       ci.getDescriptor());
        } else {
            return new MBeanConstructorInfo(ci.getName(),
View Full Code Here

                                                                              SimpleType.STRING ),
                                                               true,
                                                               false,
                                                               false );
            //No arg constructor               
            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,
View Full Code Here

                                                                              SimpleType.STRING ),
                                                               true,
                                                               false,
                                                               false );
            //No arg constructor               
            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,
View Full Code Here

TOP

Related Classes of javax.management.openmbean.OpenMBeanConstructorInfoSupport

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.