@SuppressWarnings("SameParameterValue")
	void addMXBean(MBeanServer mbeanServer, String subDomainName, MXBean bean) {
		ObjectName objectName;
		try {
			objectName = new ObjectName(DEFAULT_MONITOR_DOMAIN + ":" + subDomainName);
			mbeanServer.registerMBean(bean, objectName);
		} catch (Exception e) {
			// Not to check these exception, if there is any JMX related exception, just make it
			// error.
			throw processException(e.getMessage(), e);
		}

		MXBeanStorage.getInstance().addMXBean(subDomainName, bean);
		LOG.info("Added MXBean:{}.", objectName);
	}
Add MBeanServer to RegisterMXBean, add collector based on current setting.

@param mbeanServer JMX MBean server for registration
ngrinder-core/src/main/java/org/ngrinder/monitor/agent/RegisterMXBean.java