Class JmxConfigurator


  • public final class JmxConfigurator
    extends java.lang.Object
    Author:
    Bela Ban, Vladimir Blagojevic
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void register​(java.lang.Object obj, javax.management.MBeanServer server, java.lang.String name)  
      static void registerChannel​(JChannel channel, javax.management.MBeanServer server, java.lang.String name)
      Registers an already created channel with the given MBeanServer.
      static void registerChannel​(JChannel channel, javax.management.MBeanServer server, java.lang.String domain, java.lang.String cluster_name, boolean register_protocols)
      Registers an already created channel with the given MBeanServer.
      static void registerChannel​(JChannel ch, javax.management.MBeanServer server, javax.management.ObjectName namePrefix, java.lang.String cluster_name, boolean register_protocols)  
      static void unregister​(java.lang.Object obj, javax.management.MBeanServer server, java.lang.String name)  
      static void unregister​(javax.management.MBeanServer server, java.lang.String object_name)
      Unregisters object_name and everything under it
      static void unregisterChannel​(javax.management.MBeanServer server, java.lang.String name)  
      static void unregisterChannel​(javax.management.MBeanServer server, javax.management.ObjectName name)  
      static void unregisterChannel​(JChannel c, javax.management.MBeanServer server, java.lang.String clusterName)  
      static void unregisterChannel​(JChannel c, javax.management.MBeanServer server, java.lang.String domain, java.lang.String clusterName)  
      static void unregisterChannel​(JChannel c, javax.management.MBeanServer server, javax.management.ObjectName prefix, java.lang.String clusterName)  
      static javax.management.DynamicMBean wrap​(JChannel ch)
      Wrap JChannel with DynamicMBean interface.
      static javax.management.DynamicMBean wrap​(Protocol p)
      Wrap Protocol with DynamicMBean interface.
      • Methods inherited from class java.lang.Object

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

      • registerChannel

        public static void registerChannel​(JChannel channel,
                                           javax.management.MBeanServer server,
                                           java.lang.String domain,
                                           java.lang.String cluster_name,
                                           boolean register_protocols)
                                    throws java.lang.Exception
        Registers an already created channel with the given MBeanServer. Wraps instance of JChannel with DynamicMBean and delegates all calls to the actual JChannel wrapped.
        Optionally, this method will also wrap each protocol in the given channel with DynamicMBean and register it as well.
        Parameters:
        channel - The channel
        server - The MBeanServer
        domain - Has to be a JMX ObjectName of the domain, e.g. DefaultDomain:name=JGroups
        register_protocols - Whether or not to register the protocols, too
        Throws:
        java.lang.Exception
      • registerChannel

        public static void registerChannel​(JChannel channel,
                                           javax.management.MBeanServer server,
                                           java.lang.String name)
                                    throws java.lang.Exception
        Registers an already created channel with the given MBeanServer. Wraps instance of JChannel with DynamicMBean and delegates all calls to the actual JChannel wrapped.
        This method will also wrap each protocol in the given channel with DynamicMBean and register it as well.
        Parameters:
        channel - The channel
        server - The MBeanServer
        name - Has to be a JMX ObjectName of the domain, e.g. DefaultDomain:name=JGroups
        Throws:
        java.lang.Exception
      • registerChannel

        public static void registerChannel​(JChannel ch,
                                           javax.management.MBeanServer server,
                                           javax.management.ObjectName namePrefix,
                                           java.lang.String cluster_name,
                                           boolean register_protocols)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • unregisterChannel

        public static void unregisterChannel​(javax.management.MBeanServer server,
                                             javax.management.ObjectName name)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • unregisterChannel

        public static void unregisterChannel​(javax.management.MBeanServer server,
                                             java.lang.String name)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • unregisterChannel

        public static void unregisterChannel​(JChannel c,
                                             javax.management.MBeanServer server,
                                             java.lang.String clusterName)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • unregisterChannel

        public static void unregisterChannel​(JChannel c,
                                             javax.management.MBeanServer server,
                                             java.lang.String domain,
                                             java.lang.String clusterName)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • unregisterChannel

        public static void unregisterChannel​(JChannel c,
                                             javax.management.MBeanServer server,
                                             javax.management.ObjectName prefix,
                                             java.lang.String clusterName)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • register

        public static void register​(java.lang.Object obj,
                                    javax.management.MBeanServer server,
                                    java.lang.String name)
                             throws javax.management.MBeanRegistrationException,
                                    javax.management.MalformedObjectNameException
        Throws:
        javax.management.MBeanRegistrationException
        javax.management.MalformedObjectNameException
      • unregister

        public static void unregister​(java.lang.Object obj,
                                      javax.management.MBeanServer server,
                                      java.lang.String name)
                               throws javax.management.MBeanRegistrationException,
                                      javax.management.MalformedObjectNameException
        Throws:
        javax.management.MBeanRegistrationException
        javax.management.MalformedObjectNameException
      • wrap

        public static javax.management.DynamicMBean wrap​(JChannel ch)
        Wrap JChannel with DynamicMBean interface. All annotated attributes and methods will be exposed through DynamicMBean API.
        Parameters:
        ch - channel to be wrapped
        Returns:
        Channel ch wrapped as a DynamicBean
        See Also:
        ManagedAttribute, ManagedOperation
      • wrap

        public static javax.management.DynamicMBean wrap​(Protocol p)
        Wrap Protocol with DynamicMBean interface. All annotated attributes and methods will be exposed through DynamicMBean API.
        Parameters:
        p - protocol to be wrapped
        Returns:
        Protocol p as a DynamicMBean
        See Also:
        ManagedAttribute, ManagedOperation
      • unregister

        public static void unregister​(javax.management.MBeanServer server,
                                      java.lang.String object_name)
                               throws java.lang.Exception
        Unregisters object_name and everything under it
        Parameters:
        object_name -
        Throws:
        java.lang.Exception