Class JmxUtils


  • public abstract class JmxUtils
    extends BaseUtils
    The utilities class for JMX
    Since:
    1.0.0
    Author:
    Mercy
    • Constructor Summary

      Constructors 
      Constructor Description
      JmxUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static java.lang.Object doGetAttribute​(javax.management.MBeanServer mBeanServer, javax.management.ObjectName objectName, javax.management.MBeanAttributeInfo attributeInfo, java.lang.String attributeName)  
      static javax.management.MBeanAttributeInfo findMBeanAttributeInfo​(javax.management.MBeanServer mBeanServer, javax.management.ObjectName objectName, java.lang.String attributeName)  
      static java.lang.Object getAttribute​(javax.management.MBeanServer mBeanServer, javax.management.ObjectName objectName, java.lang.String attributeName)  
      static java.lang.Object getAttribute​(javax.management.MBeanServer mBeanServer, javax.management.ObjectName objectName, javax.management.MBeanAttributeInfo attributeInfo)  
      static MBeanAttribute[] getMBeanAttributes​(javax.management.MBeanServer mBeanServer, javax.management.ObjectName objectName)
      Get the MBeanAttributes from the specified named MBean and its' registered MBeanServer Note that the array of MBeanAttributes is the same order of MBeanInfo.getAttributes()
      static java.util.Map<java.lang.String,​MBeanAttribute> getMBeanAttributesMap​(javax.management.MBeanServer mBeanServer, javax.management.ObjectName objectName)
      Get the Map with the attribute name and MBeanAttributes from the specified named MBean and its' registered MBeanServer
      static javax.management.MBeanInfo getMBeanInfo​(javax.management.MBeanServer mBeanServer, javax.management.ObjectName objectName)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JmxUtils

        public JmxUtils()
    • Method Detail

      • getMBeanAttributesMap

        @Nonnull
        public static java.util.Map<java.lang.String,​MBeanAttribute> getMBeanAttributesMap​(javax.management.MBeanServer mBeanServer,
                                                                                                 javax.management.ObjectName objectName)
        Get the Map with the attribute name and MBeanAttributes from the specified named MBean and its' registered MBeanServer
        Parameters:
        mBeanServer - MBeanServer
        objectName - the name of MBean
        Returns:
        non-null read-only Map
      • getMBeanAttributes

        @Nonnull
        public static MBeanAttribute[] getMBeanAttributes​(javax.management.MBeanServer mBeanServer,
                                                          javax.management.ObjectName objectName)
        Get the MBeanAttributes from the specified named MBean and its' registered MBeanServer Note that the array of MBeanAttributes is the same order of MBeanInfo.getAttributes()
        Parameters:
        mBeanServer - MBeanServer
        objectName - the name of MBean
        Returns:
        non-null array
      • getAttribute

        public static java.lang.Object getAttribute​(javax.management.MBeanServer mBeanServer,
                                                    javax.management.ObjectName objectName,
                                                    javax.management.MBeanAttributeInfo attributeInfo)
      • getAttribute

        public static java.lang.Object getAttribute​(javax.management.MBeanServer mBeanServer,
                                                    javax.management.ObjectName objectName,
                                                    java.lang.String attributeName)
      • findMBeanAttributeInfo

        public static javax.management.MBeanAttributeInfo findMBeanAttributeInfo​(javax.management.MBeanServer mBeanServer,
                                                                                 javax.management.ObjectName objectName,
                                                                                 java.lang.String attributeName)
      • doGetAttribute

        protected static java.lang.Object doGetAttribute​(javax.management.MBeanServer mBeanServer,
                                                         javax.management.ObjectName objectName,
                                                         @Nullable
                                                         javax.management.MBeanAttributeInfo attributeInfo,
                                                         java.lang.String attributeName)
      • getMBeanInfo

        public static javax.management.MBeanInfo getMBeanInfo​(javax.management.MBeanServer mBeanServer,
                                                              javax.management.ObjectName objectName)