Class JmxUtil


  • @Deprecated
    public final class JmxUtil
    extends java.lang.Object
    Deprecated.
    Since 10.0. DO NOT USE! Will be moved to an internal package soon.
    Internal class containing JMX related utility methods. Strictly for internal use. This class has just become unstable and might evaporate spontaneously.
    Since:
    5.0
    Author:
    Galder ZamarreƱo
    • Constructor Summary

      Constructors 
      Constructor Description
      JmxUtil()
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static java.lang.String buildJmxDomain​(java.lang.String jmxDomain, javax.management.MBeanServer mBeanServer, java.lang.String groupName)
      Deprecated.
      Build the JMX domain name.
      static void registerMBean​(java.lang.Object mBeanInstance, javax.management.ObjectName objectName, javax.management.MBeanServer mBeanServer)
      Deprecated.
      Registers the JMX MBean.
      static void unregisterMBean​(javax.management.ObjectName objectName, javax.management.MBeanServer mBeanServer)
      Deprecated.
      Unregisters the MBean located under the given ObjectName, if it exists.
      • Methods inherited from class java.lang.Object

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

      • JmxUtil

        public JmxUtil()
        Deprecated.
    • Method Detail

      • buildJmxDomain

        public static java.lang.String buildJmxDomain​(java.lang.String jmxDomain,
                                                      javax.management.MBeanServer mBeanServer,
                                                      java.lang.String groupName)
        Deprecated.
        Build the JMX domain name. Starts from the given domain and probes it for the existence of any MBeans in the given group. If MBeans exist it appends an increasing numeric suffix (starting from 2) and retries until it finds an unused domain.
        Parameters:
        jmxDomain - The JMX domain name
        mBeanServer - the MBeanServer where to check whether the JMX domain is allowed or not.
        groupName - String containing the group name for the JMX MBean
        Returns:
        A string that combines the allowed JMX domain possibly with a unique suffix
      • registerMBean

        public static void registerMBean​(java.lang.Object mBeanInstance,
                                         javax.management.ObjectName objectName,
                                         javax.management.MBeanServer mBeanServer)
                                  throws java.lang.Exception
        Deprecated.
        Registers the JMX MBean.
        Parameters:
        mBeanInstance - MBean to register
        objectName - ObjectName under which to register the MBean.
        mBeanServer - MBeanServer where to store the MBean.
        Throws:
        java.lang.Exception - If registration could not be completed.
      • unregisterMBean

        public static void unregisterMBean​(javax.management.ObjectName objectName,
                                           javax.management.MBeanServer mBeanServer)
                                    throws java.lang.Exception
        Deprecated.
        Unregisters the MBean located under the given ObjectName, if it exists.
        Parameters:
        objectName - ObjectName where the MBean is registered
        mBeanServer - MBeanServer from which to unregister the MBean.
        Throws:
        java.lang.Exception - If unregistration could not be completed.