Package javax.management

Examples of javax.management.MBeanOperationInfo


    */
   public void testGetSignatureEmpty()
   {
      try
      {
         MBeanOperationInfo info1 = new MBeanOperationInfo(
               "SomeName",
               "some description",
               new MBeanParameterInfo[0],
               "java.util.StringBuffer",
               MBeanOperationInfo.ACTION
         );
        
         assertTrue(info1.getSignature().length == 0);
        
      }
      catch (AssertionFailedError e)
      {
         throw e;
View Full Code Here


    */
   public void testGetReturnTypeEmpty()
   {
      try
      {
         MBeanOperationInfo info1 = new MBeanOperationInfo(
               "SomeName",
               "some description",
               new MBeanParameterInfo[0],
               "",
               MBeanOperationInfo.ACTION
         );
        
         // JPL: IMHO empty or null strings should not be allowed as return type strings since they can
         //      never match any class name. However, RI allows both cases and I'm leaving JBossMX as is,
         //      unless and until the issue comes up somewhere else.
         assertTrue(info1.getReturnType().equals(""));
        
      }
      catch (AssertionFailedError e)
      {
         throw e;
View Full Code Here

    */
   public void testGetReturnTypeNull()
   {
      try
      {
         MBeanOperationInfo info1 = new MBeanOperationInfo(
               "SomeName",
               "some description",
               new MBeanParameterInfo[0],
               null,
               MBeanOperationInfo.INFO
         );
        
         // JPL: IMHO empty or null strings should not be allowed as return type strings since they can
         //      never match any class name. However, RI allows both cases and I'm leaving JBossMX as is,
         //      unless and until the issue comes up somewhere else.
         assertTrue(info1.getReturnType() == null);
        
      }
      catch (AssertionFailedError e)
      {
         throw e;
View Full Code Here

        "Property " + OVERALL_SERVICE_COUNT, true, false, false);
    attrs[counter] = overallCount;
    counter++;
     
        MBeanOperationInfo[] opers = {
          new MBeanOperationInfo(
              RESET_COUNTER, "Reset the counter",
                  null, "void", MBeanOperationInfo.ACTION)
        };
        return new MBeanInfo(
                this.getClass().getName(), "Service Message Counter MBean",
View Full Code Here

        "Property " + OVERALL_SERVICE_COUNT, true, false, false);
    attrs[counter] = overallCount;
    counter++;
     
        MBeanOperationInfo[] opers = {
          new MBeanOperationInfo(
              RESET_COUNTER, "Reset the counter",
                  null, "void", MBeanOperationInfo.ACTION)
        };
        return new MBeanInfo(
                this.getClass().getName(), "Service Message Counter MBean",
View Full Code Here

      }

      int operationCount = (operations != null) ? operations.length : 0;
      for (int i = 0; i < operationCount; i++)
      {
         MBeanOperationInfo operation = operations[i];
         MBeanParameterInfo[] params = operation.getSignature();
         String[] signature = new String[params.length];
         for (int j = 0; j < signature.length; j++)
         {
            signature[j] = params[j].getType();
         }
         store(operation.getName(), signature, new Integer(i));
      }
   }
View Full Code Here

               }
               getters.put(key, methods[i]);
            }
            else
            {
               MBeanOperationInfo info = new MBeanOperationInfo("MBean Operation.", methods[i]);
               operInfo.put(getSignatureString(methods[i]), info);
            }
         }

         Object[] keys = getters.keySet().toArray();
View Full Code Here

            String name = it.next();
            attrs[i] = new MBeanAttributeInfo(
                    name, "java.lang.String", "Property " + name, true, false, false);
        }
        MBeanOperationInfo[] opers = {
            new MBeanOperationInfo(
                START_ACTION, "Start the lifecycle",
                    null, "void", MBeanOperationInfo.ACTION),

            new MBeanOperationInfo(
                STOP_ACTION, "Stop the lifecycle",
                    null, "void", MBeanOperationInfo.ACTION),
        };
        return new MBeanInfo(
                this.getClass().getName(), "Lifecycle Controller MBean",
View Full Code Here

      e.printStackTrace();
    }
    MBeanNotificationInfo[] notifications = getNotificationInfo();
   
        MBeanOperationInfo[] opers = {
          new MBeanOperationInfo(
              RESET_COUNTER, "Reset the counter",
                  null, "void", MBeanOperationInfo.ACTION)
        };
        return new MBeanInfo(
                this.getClass().getName(), "Service Message Counter MBean",
View Full Code Here

                    "include are re-added.  It may be required to disconnect and reconnect " +
                    "the JMX console to force a refresh of the MBeanInfo";

            excludeInfo = new MBeanParameterInfo("excludeRegex", "java.lang.String", "\"" + excludes.pattern() + "\"");
            includeInfo = new MBeanParameterInfo("includeRegex", "java.lang.String", "\"" + includes.pattern() + "\"");
            MBeanOperationInfo filterOperation = new MBeanOperationInfo("FilterAttributes", description, new MBeanParameterInfo[]{
                    excludeInfo,
                    includeInfo,
            }, "void", 3);
            operations.add(filterOperation);
            operationsMap.put(filterOperation.getName(), new MethodMember(method, this, ""));

            filterAttributes = true;
        } catch (NoSuchMethodException e) {
            throw new IllegalStateException(e);
        }
View Full Code Here

TOP

Related Classes of javax.management.MBeanOperationInfo

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.