use of org.springframework.jmx.export.metadata.ManagedNotification in project spring-framework by spring-projects.
the class AbstractConfigurableMBeanInfoAssembler method setNotificationInfos.
public void setNotificationInfos(ManagedNotification[] notificationInfos) {
ModelMBeanNotificationInfo[] infos = new ModelMBeanNotificationInfo[notificationInfos.length];
for (int i = 0; i < notificationInfos.length; i++) {
ManagedNotification notificationInfo = notificationInfos[i];
infos[i] = JmxMetadataUtils.convertToModelMBeanNotificationInfo(notificationInfo);
}
this.notificationInfos = infos;
}
use of org.springframework.jmx.export.metadata.ManagedNotification in project spring-framework by spring-projects.
the class MetadataMBeanInfoAssembler method getNotificationInfo.
/**
* Reads the {@link ManagedNotification} metadata from the {@code Class} of the managed resource
* and generates and returns the corresponding {@link ModelMBeanNotificationInfo} metadata.
*/
@Override
protected ModelMBeanNotificationInfo[] getNotificationInfo(Object managedBean, String beanKey) {
ManagedNotification[] notificationAttributes = obtainAttributeSource().getManagedNotifications(getClassToExpose(managedBean));
ModelMBeanNotificationInfo[] notificationInfos = new ModelMBeanNotificationInfo[notificationAttributes.length];
for (int i = 0; i < notificationAttributes.length; i++) {
ManagedNotification attribute = notificationAttributes[i];
notificationInfos[i] = JmxMetadataUtils.convertToModelMBeanNotificationInfo(attribute);
}
return notificationInfos;
}
Aggregations