MetadataMBeanInfoAssembler.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:class-guard 作者:
/**
 * 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 =
            this.attributeSource.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;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号