StatsProviderRegistry getStatsProviderRegistry() {
return this.statsProviderRegistry;
}
private ManagedObjectManager registerGmbal(Object statsProvider, String mbeanName) {
ManagedObjectManager mom = null;
try {
// 1 mom per statsProvider
mom = ManagedObjectManagerFactory.createFederated(MONITORING_SERVER);
if (mom != null) {
mom.setJMXRegistrationDebug(false);
if (mom.isManagedObject(statsProvider)) {
mom.stripPackagePrefix();
if (mbeanName != null && !mbeanName.isEmpty()) {
if (mbeanName.indexOf('\\') > 0) {
mbeanName = StringUtils.removeChar(mbeanName, '\\');
}
mbeanName = mbeanName.replaceAll(SystemPropertyConstants.SLASH, "/");
mom.createRoot(statsProvider, mbeanName);
}
else {
mom.createRoot(statsProvider);
}
}
else {
String spName = statsProvider.getClass().getName();
logger.log(Level.INFO, "notaManagedObject", new Object[]{spName});