code: private synchronized void onNewMbean(ObjectName obj) {
          if (detected_groups_.keySet().contains(obj)) {
              LOG.log(Level.WARNING, "skipping registration of {0}: already present", obj);
              return;
          }
  
          MBeanGroup instance = new MBeanGroup(obj, resolvedMap);
          detected_groups_.put(obj, instance);
          LOG.log(Level.FINE, "registered metrics for {0}: {1}", new Object[]{obj, instance});
      }
docs: Respond to MBeans being added.
  
  @param obj The name of the MBean being added.