/** * Used to invoke the monitor lifecycle methods MonitoringEngine.initMonitor and * MonitoringEngine.monitorCreated on this monitor. * * @param name the name of the monitor * @param inheritedAttributes the collection of inherited attributes */ protected void init(String name, final Map<String, Object> inheritedAttributes) { MonitoringEngine.getInstance().initMonitor(this); if (name != null) { for (int i = 0; i < name.length(); i++) { if (invalidCharSet.contains(Character.valueOf(name.charAt(i)))) { name = CharSetUtils.delete(name, invalidCharacters); break; } } } set(Attribute.NAME, name); setInheritedAttributes(inheritedAttributes); MonitoringEngine.getInstance().monitorCreated(this); }