Package javax.management

Examples of javax.management.MBeanParameterInfo


            new ModelMBeanOperationInfo(
                  "invoke",                                 // name
                  "Shared interceptor invoke operation.",   // description
                  new MBeanParameterInfo[]                  // arguments
                  {
                     new MBeanParameterInfo(
                           "invocation",                    // name
                           Invocation.class.getName(),      // type
                           "The invocation object."         // description
                     )
                  },
View Full Code Here


               (
                  setMethod,
                  "setMethod operation for '" + name + "' attribute.",
                  new MBeanParameterInfo[]
                  {
                      new MBeanParameterInfo("value", type, "The new value")
                  },
                  Void.TYPE.getName(),
                  MBeanOperationInfo.ACTION,
                  setterDescriptor
               );
View Full Code Here

         Element param = (Element) it.next();
         String name = param.getChildTextTrim("name");
         String type = param.getChildTextTrim("type");
         String descr = param.getChildTextTrim("description");

         MBeanParameterInfo info = new MBeanParameterInfo(name, type, descr);

         infos.add(info);
      }

      return (MBeanParameterInfo[]) infos.toArray(new MBeanParameterInfo[0]);
View Full Code Here

               ModelMBeanOperationInfo opInfo = new ModelMBeanOperationInfo(
                     setterOperationName,
                     "Write accessor operation for '" + attributes[i].getName() + "' attribute.",
                    
                     new MBeanParameterInfo[] {
                        new MBeanParameterInfo("value", attributes[i].getType(), "Attribute's value.")
                     },
                    
                     Void.TYPE.getName(),
                     MBeanOperationInfo.ACTION,
                     setterDescriptor
View Full Code Here

         Element param = (Element) it.next();
         String name = param.getChildTextTrim("name");
         String type = param.getChildTextTrim("type");
         String descr = param.getChildTextTrim("description");

         MBeanParameterInfo info = new MBeanParameterInfo(name, type, descr);

         infos.add(info);
      }

      return (MBeanParameterInfo[]) infos.toArray(new MBeanParameterInfo[0]);
View Full Code Here

      descRegisterMBean.setField("descriptorType", "operation");
      descRegisterMBean.setField("role", "operation");
      MBeanParameterInfo[] registerMBeanParms =
      new MBeanParameterInfo[]
      {
          new MBeanParameterInfo
          (
             "Resource",
             Object.class.getName(),
             "A compliant MBean to be registered in the MBean Server"
          ),
          new MBeanParameterInfo
          (
             "ObjectName",
             ObjectName.class.getName(),
             "The object name of the MBean"
          ),
          new MBeanParameterInfo
          (
             "ValueMap",
             Map.class.getName(),
             "Values associated with the registration"
          ),
      };
      ModelMBeanOperationInfo registerMBeanInfo =
      new ModelMBeanOperationInfo
      (
         "registerMBean",
         "Adds an MBean in the MBeanServer",
         registerMBeanParms,
         ObjectInstance.class.getName(),
         ModelMBeanOperationInfo.ACTION_INFO,
         descRegisterMBean
      );

      // unregisterMBean operation
      DescriptorSupport descUnregisterMBean = new DescriptorSupport();
      descUnregisterMBean.setField("name", "unregisterMBean");
      descUnregisterMBean.setField("descriptorType", "operation");
      descUnregisterMBean.setField("role", "operation");
      MBeanParameterInfo[] unregisterMBeanParms =
      new MBeanParameterInfo[]
      {
          new MBeanParameterInfo
          (
             "ObjectName",
             ObjectName.class.getName(),
             "The object name of the MBean to remove"
          )
      };
      ModelMBeanOperationInfo unregisterMBeanInfo =
      new ModelMBeanOperationInfo
      (
         "unregisterMBean",
         "Removes an MBean from the MBeanServer",
         unregisterMBeanParms,
         Void.TYPE.getName(),
         ModelMBeanOperationInfo.ACTION,
         descUnregisterMBean
      );

      // getSize operation
      DescriptorSupport descGetSize = new DescriptorSupport();
      descGetSize.setField("name", "getSize");
      descGetSize.setField("descriptorType", "operation");
      descGetSize.setField("role", "operation");
      MBeanParameterInfo[] getSizeParms = new MBeanParameterInfo[0];
      ModelMBeanOperationInfo getSizeInfo =
      new ModelMBeanOperationInfo
      (
         "getSize",
         "Gets the number of MBeans registered",
         getSizeParms,
         Integer.TYPE.getName(),
         ModelMBeanOperationInfo.INFO,
         descGetSize
      );

       // get operation
       DescriptorSupport descGet = new DescriptorSupport();
       descGet.setField("name", "get");
       descGet.setField("descriptorType", "operation");
       descGet.setField("role", "operation");
       MBeanParameterInfo[] getParam = new MBeanParameterInfo[1];
       getParam[0]=new MBeanParameterInfo("ObjectName",ObjectName.class.getName(),"object name to find");
       ModelMBeanOperationInfo getInfo =
       new ModelMBeanOperationInfo
       (
          "get",
          "Gets the MBeanEntry for a given ObjectName",
          getParam,
          MBeanEntry.class.getName(),
          ModelMBeanOperationInfo.INFO,
          descGet
       );

      // getValue operation
      DescriptorSupport descGetValue = new DescriptorSupport();
      descGetValue.setField("name", "getValue");
      descGetValue.setField("descriptorType", "operation");
      descGetValue.setField("role", "operation");
      MBeanParameterInfo[] getValueParms = new MBeanParameterInfo[]
      {
         new MBeanParameterInfo
         (
            "ObjectName",
            ObjectName.class.getName(),
            "The object name of the registered MBean"
         ),
         new MBeanParameterInfo
         (
            "Key",
            String.class.getName(),
            "The key to the value stored"
         )
View Full Code Here

            {
               new ModelMBeanOperationInfo(
                     "createLogger", "",
                     new MBeanParameterInfo[]
                     {
                          new MBeanParameterInfo(
                              "clazz",
                              Class.class.getName(),
                              ""
                          )
                     },
                     ObjectName.class.getName(),
                     MBeanOperationInfo.ACTION
               ),
              
               new ModelMBeanOperationInfo(
                     "createLogger", "",
                     new MBeanParameterInfo[]
                     {
                           new MBeanParameterInfo(
                              "name",
                              String.class.getName(),
                              ""
                           )
                     },
                     ObjectName.class.getName(),
                     MBeanOperationInfo.ACTION
                ),
               
                new ModelMBeanOperationInfo(
                     "getLogger", "",
                     new MBeanParameterInfo[]
                     {
                           new MBeanParameterInfo(
                              "clazz",
                              Class.class.getName(),
                              ""
                           )
                     },
                     Logger.class.getName(),
                     MBeanOperationInfo.ACTION
                ),
               
                new ModelMBeanOperationInfo(
                     "getLogger", "",
                     new MBeanParameterInfo[]
                     {
                           new MBeanParameterInfo(
                              "name",
                              String.class.getName(),
                              ""
                           )
                     },
View Full Code Here

                  new ModelMBeanOperationInfo(
                        "setLevel", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "level", int.class.getName(), ""
                           )
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),
                 
                  new ModelMBeanOperationInfo(
                        "getLevel", "", null,
                        int.class.getName(),
                        MBeanOperationInfo.INFO
                  ),
                 
                  new ModelMBeanOperationInfo(
                        "getUnderlyingLogger", "", null,
                        Object.class.getName(),
                        MBeanOperationInfo.INFO
                  ),
                       
                  new ModelMBeanOperationInfo(
                        "isDebugEnabled", "", null,
                        boolean.class.getName(),
                        MBeanOperationInfo.INFO
                  ),
                 
                  new ModelMBeanOperationInfo(
                        "isErrorEnabled", "", null,
                        boolean.class.getName(),
                        MBeanOperationInfo.INFO
                  ),

                  new ModelMBeanOperationInfo(
                        "isFatalEnabled", "", null,
                        boolean.class.getName(),
                        MBeanOperationInfo.INFO
                  ),

                  new ModelMBeanOperationInfo(
                        "isTraceEnabled", "", null,
                        boolean.class.getName(),
                        MBeanOperationInfo.INFO
                  ),

                  new ModelMBeanOperationInfo(
                        "isInfoEnabled", "", null,
                        boolean.class.getName(),
                        MBeanOperationInfo.INFO
                  ),

                  new ModelMBeanOperationInfo(
                        "isWarnEnabled", "", null,
                        boolean.class.getName(),
                        MBeanOperationInfo.INFO
                  ),

                  new ModelMBeanOperationInfo(
                     "isEnabled", "",
                    
                     new MBeanParameterInfo[]
                     {
                        new MBeanParameterInfo(
                              "level", int.class.getName(), ""
                        )
                     },
                    
                     boolean.class.getName(),
                     MBeanOperationInfo.INFO
                  ),
                 
                  new ModelMBeanOperationInfo(
                        "debug", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "msg", String.class.getName(), ""
                           )
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),
                 
                  new ModelMBeanOperationInfo(
                        "debug", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "msg", String.class.getName(), ""
                           ),
                           new MBeanParameterInfo(
                                 "exception", Throwable.class.getName(), ""
                           ),
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),

                  new ModelMBeanOperationInfo(
                        "error", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "msg", String.class.getName(), ""
                           )
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),
                 
                  new ModelMBeanOperationInfo(
                        "error", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "msg", String.class.getName(), ""
                           ),
                           new MBeanParameterInfo(
                                 "exception", Throwable.class.getName(), ""
                           ),
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),

                  new ModelMBeanOperationInfo(
                        "fatal", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "msg", String.class.getName(), ""
                           )
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),
                 
                  new ModelMBeanOperationInfo(
                        "fatal", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "msg", String.class.getName(), ""
                           ),
                           new MBeanParameterInfo(
                                 "exception", Throwable.class.getName(), ""
                           ),
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),

                  new ModelMBeanOperationInfo(
                        "trace", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "msg", String.class.getName(), ""
                           )
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),
                 
                  new ModelMBeanOperationInfo(
                        "trace", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "msg", String.class.getName(), ""
                           ),
                           new MBeanParameterInfo(
                                 "exception", Throwable.class.getName(), ""
                           ),
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),

                  new ModelMBeanOperationInfo(
                        "info", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "msg", String.class.getName(), ""
                           )
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),
                 
                  new ModelMBeanOperationInfo(
                        "info", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "msg", String.class.getName(), ""
                           ),
                           new MBeanParameterInfo(
                                 "exception", Throwable.class.getName(), ""
                           ),
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),

                  new ModelMBeanOperationInfo(
                        "warn", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "msg", String.class.getName(), ""
                           )
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),
                 
                  new ModelMBeanOperationInfo(
                        "warn", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "msg", String.class.getName(), ""
                           ),
                           new MBeanParameterInfo(
                                 "exception", Throwable.class.getName(), ""
                           ),
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),

                  new ModelMBeanOperationInfo(
                        "log", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "level", int.class.getName(), ""
                           ),
                           new MBeanParameterInfo(
                                 "msg", String.class.getName(), ""
                           )
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),
                 
                  new ModelMBeanOperationInfo(
                        "log", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "level", int.class.getName(), ""
                           ),
                           new MBeanParameterInfo(
                                 "msg", String.class.getName(), ""
                           ),
                           new MBeanParameterInfo(
                                 "exception", Throwable.class.getName(), ""
                           ),
                        },
                       
                        void.class.getName(),
                        MBeanOperationInfo.ACTION
                  ),

                  new ModelMBeanOperationInfo(
                        "setLoggerAdapter", "",
                       
                        new MBeanParameterInfo[]
                        {
                           new MBeanParameterInfo(
                                 "Logger Adapter", LoggerAdapter.class.getName(), ""
                           )
                        },
                       
                        void.class.getName(),
View Full Code Here

            String description = "Filters the attributes that show up in the MBeanInfo." +
                    "  The exclude is applied first, then any attributes that match the " +
                    "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);
View Full Code Here

        for (Member member : operationsMap.values()) {
            MBeanOperationInfo op = new MBeanOperationInfo("", ((MethodMember) member).getter);
            operations.add(new MBeanOperationInfo(member.getName(), "", op.getSignature(), op.getReturnType(), op.getImpact()));
        }
        filterAttributes = true;
        excludeInfo = new MBeanParameterInfo("excludeRegex", "java.lang.String", "\"" + excludes.pattern() + "\"");
        includeInfo = new MBeanParameterInfo("includeRegex", "java.lang.String", "\"" + includes.pattern() + "\"");
    }
View Full Code Here

TOP

Related Classes of javax.management.MBeanParameterInfo

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.