}
private void doHandleNotification(Notification notif, Object o) {
LOGGER.trace("handleNotification[{}]", notif);
if (notif instanceof MBeanServerNotification) {
MBeanServerNotification notification = (MBeanServerNotification) notif;
String domain = notification.getMBeanName().getDomain();
String path = CONTAINER_DOMAIN.getPath((String) o, domain);
try {
if (MBeanServerNotification.REGISTRATION_NOTIFICATION.equals(notification.getType())) {
if (domains.add(domain) && exists(curator.get(), path) == null) {
setData(curator.get(), path, "");
}
} else if (MBeanServerNotification.UNREGISTRATION_NOTIFICATION.equals(notification.getType())) {
domains.clear();
domains.addAll(Arrays.asList(mbeanServer.get().getDomains()));
if (!domains.contains(domain)) {
// domain is no present any more
deleteSafe(curator.get(), path);