/**
* Convert the supplied {@link ManagedNotification} into the corresponding
* {@link javax.management.modelmbean.ModelMBeanNotificationInfo}.
*/
public static ModelMBeanNotificationInfo convertToModelMBeanNotificationInfo(ManagedNotification notificationInfo) {
String name = notificationInfo.getName();
if (!StringUtils.hasText(name)) {
throw new IllegalArgumentException("Must specify notification name");
}
String[] notifTypes = notificationInfo.getNotificationTypes();
if (notifTypes == null || notifTypes.length == 0) {
throw new IllegalArgumentException("Must specify at least one notification type");
}
String description = notificationInfo.getDescription();
return new ModelMBeanNotificationInfo(notifTypes, name, description);
}
JmxMetadataUtils.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:lams
作者:
评论列表
文章目录