Class JmxRegistry


  • public class JmxRegistry
    extends java.lang.Object
    JMX registry for managing MBean registration for a channel.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static StringManager sm
      String manager for this class.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static JmxRegistry getRegistry​(Channel channel)
      Get the JMX registry for the given channel.
      javax.management.ObjectName registerJmx​(java.lang.String keyprop, java.lang.Object bean)
      Register an MBean with the JMX server.
      static void removeRegistry​(Channel channel, boolean clear)
      Remove the JMX registry for the given channel.
      void unregisterJmx​(javax.management.ObjectName oname)
      Unregister an MBean from the JMX server.
      • Methods inherited from class java.lang.Object

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

      • sm

        protected static final StringManager sm
        String manager for this class.
    • Method Detail

      • getRegistry

        public static JmxRegistry getRegistry​(Channel channel)
        Get the JMX registry for the given channel.
        Parameters:
        channel - the channel
        Returns:
        the JMX registry, or null if JMX is not enabled
      • removeRegistry

        public static void removeRegistry​(Channel channel,
                                          boolean clear)
        Remove the JMX registry for the given channel.
        Parameters:
        channel - the channel
        clear - whether to clear the MBeans
      • registerJmx

        public javax.management.ObjectName registerJmx​(java.lang.String keyprop,
                                                       java.lang.Object bean)
        Register an MBean with the JMX server.
        Parameters:
        keyprop - the key property
        bean - the MBean to register
        Returns:
        the registered object name, or null on failure
      • unregisterJmx

        public void unregisterJmx​(javax.management.ObjectName oname)
        Unregister an MBean from the JMX server.
        Parameters:
        oname - the object name to unregister