Add blueprint wiring to sal-distributed-datastore
[controller.git] / opendaylight / md-sal / sal-common-util / src / main / java / org / opendaylight / controller / md / sal / common / util / jmx / AbstractMXBean.java
index c24c8dc068d19015fbed686bb321831bd056ccfb..40e1bd35fcad9ab2a3312130435d39c271c0888f 100644 (file)
@@ -69,6 +69,14 @@ public abstract class AbstractMXBean {
         return new ObjectName(builder.toString());
     }
 
+    /**
+     * This method is a wrapper for registerMBean with void return type so it can be invoked by dependency
+     * injection frameworks such as Spring and Blueprint.
+     */
+    public void register() {
+        registerMBean();
+    }
+
     /**
      * Registers this bean with the platform MBean server with the domain defined by
      * {@link #BASE_JMX_PREFIX}.
@@ -107,6 +115,14 @@ public abstract class AbstractMXBean {
         return registered;
     }
 
+    /**
+     * This method is a wrapper for unregisterMBean with void return type so it can be invoked by dependency
+     * injection frameworks such as Spring and Blueprint.
+     */
+    public void unregister() {
+        unregisterMBean();
+    }
+
     /**
      * Unregisters this bean with the platform MBean server.
      *