@Override void getNotificationDescriptions(ListIterator<PathElement> iterator, Map<String, NotificationEntry> providers, boolean inherited) { Map<String, NotificationEntry> temp = new HashMap<String, NotificationEntry>(); target.getNotificationDescriptions(iterator, temp, inherited); for (Map.Entry<String, NotificationEntry> entry : providers.entrySet()) { providers.put(entry.getKey(), new NotificationEntry(entry.getValue().getDescriptionProvider(), entry.getValue().isInherited())); } }
@Override void getNotificationDescriptions(ListIterator<PathElement> iterator, Map<String, NotificationEntry> providers, boolean inherited) { Map<String, NotificationEntry> temp = new HashMap<String, NotificationEntry>(); target.getNotificationDescriptions(iterator, temp, inherited); for (Map.Entry<String, NotificationEntry> entry : providers.entrySet()) { providers.put(entry.getKey(), new NotificationEntry(entry.getValue().getDescriptionProvider(), entry.getValue().isInherited())); } }
@Override void getNotificationDescriptions(ListIterator<PathElement> iterator, Map<String, NotificationEntry> providers, boolean inherited) { Map<String, NotificationEntry> temp = new HashMap<String, NotificationEntry>(); target.getNotificationDescriptions(iterator, temp, inherited); for (Map.Entry<String, NotificationEntry> entry : providers.entrySet()) { providers.put(entry.getKey(), new NotificationEntry(entry.getValue().getDescriptionProvider(), entry.getValue().isInherited())); } }
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()]); }
final DescriptionProvider provider = entry.getValue().getDescriptionProvider(); notifications.put(entry.getKey(), provider.getModelDescription(locale));
final DescriptionProvider provider = entry.getValue().getDescriptionProvider(); notifications.put(entry.getKey(), provider.getModelDescription(locale));
final DescriptionProvider provider = entry.getValue().getDescriptionProvider(); notifications.put(entry.getKey(), provider.getModelDescription(locale));