@Override public Map<String, NotificationEntry> getNotificationDescriptions(PathAddress address, boolean inherited) { return delegate.getNotificationDescriptions(address, inherited); }
@Override public Map<String, NotificationEntry> getNotificationDescriptions(PathAddress address, boolean inherited) { return delegate.getNotificationDescriptions(address, inherited); }
@Override public Map<String, NotificationEntry> getNotificationDescriptions(PathAddress address, boolean inherited) { return delegate.getNotificationDescriptions(address, inherited); }
private MBeanNotificationInfo[] getNotifications() { List<MBeanNotificationInfo> notifications = new ArrayList<>(); for (Map.Entry<String, NotificationEntry> entry : resourceRegistration.getNotificationDescriptions(PathAddress.EMPTY_ADDRESS, true).entrySet()) { ModelNode descriptionModel = entry.getValue().getDescriptionProvider().getModelDescription(null); String description = descriptionModel.get(DESCRIPTION).asString(); String notificationType = entry.getKey(); MBeanNotificationInfo info = null; if (notificationType.equals(ModelDescriptionConstants.ATTRIBUTE_VALUE_WRITTEN_NOTIFICATION)) { info = new MBeanNotificationInfo(new String[]{AttributeChangeNotification.ATTRIBUTE_CHANGE}, AttributeChangeNotification.class.getName(), description); } else if (notificationType.equals(ModelDescriptionConstants.RESOURCE_ADDED_NOTIFICATION) || notificationType.equals(ModelDescriptionConstants.RESOURCE_REMOVED_NOTIFICATION)) { // do not expose these notifications as they are emitted by the JMImplementation:type=MBeanServerDelegate MBean. } else { info = new MBeanNotificationInfo(new String[]{notificationType}, Notification.class.getName(), description); } if (info != null) { notifications.add(info); } } return notifications.toArray(new MBeanNotificationInfo[notifications.size()]); }
private MBeanNotificationInfo[] getNotifications() { List<MBeanNotificationInfo> notifications = new ArrayList<>(); for (Map.Entry<String, NotificationEntry> entry : resourceRegistration.getNotificationDescriptions(PathAddress.EMPTY_ADDRESS, true).entrySet()) { ModelNode descriptionModel = entry.getValue().getDescriptionProvider().getModelDescription(null); String description = descriptionModel.get(DESCRIPTION).asString(); String notificationType = entry.getKey(); MBeanNotificationInfo info = null; if (notificationType.equals(ModelDescriptionConstants.ATTRIBUTE_VALUE_WRITTEN_NOTIFICATION)) { info = new MBeanNotificationInfo(new String[]{AttributeChangeNotification.ATTRIBUTE_CHANGE}, AttributeChangeNotification.class.getName(), description); } else if (notificationType.equals(ModelDescriptionConstants.RESOURCE_ADDED_NOTIFICATION) || notificationType.equals(ModelDescriptionConstants.RESOURCE_REMOVED_NOTIFICATION)) { // do not expose these notifications as they are emitted by the JMImplementation:type=MBeanServerDelegate MBean. } else { info = new MBeanNotificationInfo(new String[]{notificationType}, Notification.class.getName(), description); } if (info != null) { notifications.add(info); } } return notifications.toArray(new MBeanNotificationInfo[notifications.size()]); }
/** * Check that each emitted notification is properly described by its source. */ private void checkUndefinedNotification(Notification notification) { String type = notification.getType(); PathAddress source = notification.getSource(); Map<String, NotificationEntry> descriptions = getRootResourceRegistration().getNotificationDescriptions(source, true); if (!descriptions.keySet().contains(type)) { missingNotificationDescriptionWarnings.add(ControllerLogger.ROOT_LOGGER.notificationIsNotDescribed(type, source)); } }
/** * Check that each emitted notification is properly described by its source. */ private void checkUndefinedNotification(Notification notification) { String type = notification.getType(); PathAddress source = notification.getSource(); Map<String, NotificationEntry> descriptions = getRootResourceRegistration().getNotificationDescriptions(source, true); if (!descriptions.keySet().contains(type)) { missingNotificationDescriptionWarnings.add(ControllerLogger.ROOT_LOGGER.notificationIsNotDescribed(type, source)); } }
/** * Check that each emitted notification is properly described by its source. */ private void checkUndefinedNotifications(Collection<Notification> notifications) { for (Notification notification : notifications) { String type = notification.getType(); PathAddress source = notification.getSource(); Map<String, NotificationEntry> descriptions = getRootResourceRegistration().getNotificationDescriptions(source, true); if (!descriptions.keySet().contains(type)) { ControllerLogger.ROOT_LOGGER.notificationIsNotDescribed(type, source); } } }
for (final Map.Entry<String, NotificationEntry> entry : registry.getNotificationDescriptions(PathAddress.EMPTY_ADDRESS, inherited).entrySet()) { final DescriptionProvider provider = entry.getValue().getDescriptionProvider(); notifications.put(entry.getKey(), provider.getModelDescription(locale));
for (final Map.Entry<String, NotificationEntry> entry : registry.getNotificationDescriptions(PathAddress.EMPTY_ADDRESS, inherited).entrySet()) { final DescriptionProvider provider = entry.getValue().getDescriptionProvider(); notifications.put(entry.getKey(), provider.getModelDescription(locale));
for (final Map.Entry<String, NotificationEntry> entry : registry.getNotificationDescriptions(PathAddress.EMPTY_ADDRESS, inherited).entrySet()) { final DescriptionProvider provider = entry.getValue().getDescriptionProvider(); notifications.put(entry.getKey(), provider.getModelDescription(locale));