Examples of OpenMBeanOperationInfoSupport


Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

   public void testCtorNullName() throws Exception
   {
      try
      {
         OpenMBeanOperationInfoSupport info =
                 new OpenMBeanOperationInfoSupport(null,
                                                   "compute the exchange rate for two currencies",
                                                   signature,
                                                   SimpleType.FLOAT,
                                                   MBeanOperationInfo.INFO);
         fail("Expecting IllegalArgumentException");
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

   public void testCtorEmptyName() throws Exception
   {
      try
      {
         OpenMBeanOperationInfoSupport info =
                 new OpenMBeanOperationInfoSupport("",
                                                   "compute the exchange rate for two currencies",
                                                   signature,
                                                   SimpleType.FLOAT,
                                                   MBeanOperationInfo.INFO);
         fail("Expecting IllegalArgumentException");
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

   public void testCtorNullDescription() throws Exception
   {
      try
      {
         OpenMBeanOperationInfoSupport info =
                 new OpenMBeanOperationInfoSupport("exchangeRate",
                                                   null,
                                                   signature,
                                                   SimpleType.FLOAT,
                                                   MBeanOperationInfo.INFO);
         fail("Expecting IllegalArgumentException");
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

   public void testCtorEmptyDescription() throws Exception
   {
      try
      {
         OpenMBeanOperationInfoSupport info =
                 new OpenMBeanOperationInfoSupport("exchangeRate",
                                                   "",
                                                   signature,
                                                   SimpleType.FLOAT,
                                                   MBeanOperationInfo.INFO);
         fail("Expecting IllegalArgumentException");
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

      }
   }

   public void testCtorNullSignature() throws Exception
   {
      OpenMBeanOperationInfoSupport info =
              new OpenMBeanOperationInfoSupport("exchangeRate",
                                                "compute the exchange rate for two currencies",
                                                null,
                                                SimpleType.FLOAT,
                                                MBeanOperationInfo.INFO);
      assertTrue("Null info constructed", info != null);
      assertTrue("Unexpected name",
                 info.getName().compareTo("exchangeRate") == 0);
      assertTrue("Unexpected description",
                 info.getDescription().compareTo("compute the exchange rate for two currencies")
                 == 0);
      assertTrue("Unexpected return open type",
                 info.getReturnOpenType().equals(SimpleType.FLOAT));
      assertTrue("Unexpected signature",
                 Arrays.equals(info.getSignature(), new OpenMBeanParameterInfo[0]));
      assertTrue("Unexpected impact",
                 info.getImpact() == MBeanOperationInfo.INFO);
   }
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

                 info.getImpact() == MBeanOperationInfo.INFO);
   }

   public void testCtorEmptySignature() throws Exception
   {
      OpenMBeanOperationInfoSupport info =
              new OpenMBeanOperationInfoSupport("exchangeRate",
                                                "compute the exchange rate for two currencies",
                                                new OpenMBeanParameterInfo[0],
                                                SimpleType.FLOAT,
                                                MBeanOperationInfo.INFO);
      assertTrue("Null info constructed", info != null);
      assertTrue("Unexpected name",
                 info.getName().compareTo("exchangeRate") == 0);
      assertTrue("Unexpected description",
                 info.getDescription().compareTo("compute the exchange rate for two currencies")
                 == 0);
      assertTrue("Unexpected return open type",
                 info.getReturnOpenType().equals(SimpleType.FLOAT));
      assertTrue("Unexpected signature",
                 Arrays.equals(info.getSignature(), new OpenMBeanParameterInfo[0]));
      assertTrue("Unexpected impact",
                 info.getImpact() == MBeanOperationInfo.INFO);
   }
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

             * in the Descriptor in either case.
             */
            final OpenMBeanParameterInfo[] oparams =
                new OpenMBeanParameterInfo[params.length];
            System.arraycopy(params, 0, oparams, 0, params.length);
            oi = new OpenMBeanOperationInfoSupport(operationName,
                                                   description,
                                                   oparams,
                                                   returnType,
                                                   impact,
                                                   descriptor);
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

            return oi;
        if (oi instanceof OpenMBeanOperationInfo) {
            OpenMBeanOperationInfo ooi = (OpenMBeanOperationInfo) oi;
            OpenMBeanParameterInfo[] oparams =
                paramsToOpenParams(signature);
            return new OpenMBeanOperationInfoSupport(oi.getName(),
                                                     description,
                                                     oparams,
                                                     ooi.getReturnOpenType(),
                                                     impact,
                                                     oi.getDescriptor());
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

            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,
                                                               "Creates, registers and starts all the dependent MBeans that allow monitor all the details in this KnowledgeBase.",
                                                               params,
                                                               SimpleType.VOID,
                                                               MBeanOperationInfo.INFO );
            operations[1] = new OpenMBeanOperationInfoSupport( OP_STOP_INTERNAL_MBEANS,
                                                               "Stops and disposes all the dependent MBeans that allow monitor all the details in this KnowledgeBase.",
                                                               params,
                                                               SimpleType.VOID,
                                                               MBeanOperationInfo.INFO );
View Full Code Here

Examples of javax.management.openmbean.OpenMBeanOperationInfoSupport

            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,
                                                               "Creates, registers and starts all the dependent MBeans that allow monitor all the details in this KnowledgeBase.",
                                                               params,
                                                               SimpleType.VOID,
                                                               MBeanOperationInfo.INFO );
            operations[1] = new OpenMBeanOperationInfoSupport( OP_STOP_INTERNAL_MBEANS,
                                                               "Stops and disposes all the dependent MBeans that allow monitor all the details in this KnowledgeBase.",
                                                               params,
                                                               SimpleType.VOID,
                                                               MBeanOperationInfo.INFO );
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.