1 package com.atlassian.cache.impl.jmx;
2
3 import javax.annotation.Nullable;
4 import javax.management.MBeanServer;
5
6 /**
7 * Provides operations for managing registration of JMX MBeans
8 *
9 * @since v2.0.11
10 */
11 @SuppressWarnings("UnusedDeclaration")
12 public interface MBeanRegistrar
13 {
14 /**
15 * Tells this object to register its JMX MBeans with the given server.
16 * What beans are registered, if any, is up to the implementation.
17 *
18 * @param mBeanServer the server with which to register the MBeans (ignored if null)
19 * @since 2.0.11
20 */
21 void registerMBeans(@Nullable MBeanServer mBeanServer);
22
23 /**
24 * Tells this object to deregister its JMX MBeans from the given server.
25 * All previously registered beans should be deregistered.
26 *
27 * @param mBeanServer the server with which to deregister the MBeans (ignored if null)
28 * @since 2.4.0
29 */
30 void unregisterMBeans(@Nullable MBeanServer mBeanServer);
31 }