org.hibernate.search.util.jmx.impl

## Class JMXRegistrar

- java.lang.Object
- - org.hibernate.search.util.jmx.impl.JMXRegistrar

-     public final class JMXRegistrar
      extends Object

  Helper class to register JMX beans.
  Author:
    Hardy Ferentschik

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `JMXRegistrar.IndexingProgressMonitor` A JMX based mass indexer progress monitor.
    `static class` | `JMXRegistrar.StatisticsInfo`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `buildMBeanName(String defaultName, String suffix)`
    `static boolean` | `isNameRegistered(String name)` Checks whether a bean is registered under the given name.
    `static <T> String` | `registerMBean(T object, Class<T> beanInterface, String name)` Registers the specified object with the given name to the MBean server.
    `static void` | `unRegisterMBean(String name)` Unregister the MBean with the specified name.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### buildMBeanName

          public static String buildMBeanName(String defaultName,
                                              String suffix)

    - #### registerMBean

          public static <T> String registerMBean(T object,
                                                 Class<T> beanInterface,
                                                 String name)

      Registers the specified object with the given name to the MBean server.
      Type Parameters:
        `T` - the type of the object interface
      Parameters:
        `object` - the object to register
        `beanInterface` - the Management Interface exported by this MBean's implementation.
        `name` - the object name to register the bean under
      Returns:
        The registered object name

    - #### unRegisterMBean

          public static void unRegisterMBean(String name)

      Unregister the MBean with the specified name.
      Parameters:
        `name` - The name of the bean to unregister. The `name` cannot be `null`
      Throws:
        `IllegalArgumentException` - In case the object name is `null`

    - #### isNameRegistered

          public static boolean isNameRegistered(String name)

      Checks whether a bean is registered under the given name.
      Parameters:
        `name` - the object name to check (as string)
      Returns:
        `true` is there is a bean registered under the given name, `false` otherwise.
      Throws:
        `IllegalArgumentException` - In case the object name is `null`

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved