• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ManagedNotification类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中org.springframework.jmx.export.metadata.ManagedNotification的典型用法代码示例。如果您正苦于以下问题:Java ManagedNotification类的具体用法?Java ManagedNotification怎么用?Java ManagedNotification使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ManagedNotification类属于org.springframework.jmx.export.metadata包,在下文中一共展示了ManagedNotification类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getManagedNotifications

点赞 3

import org.springframework.jmx.export.metadata.ManagedNotification; //导入依赖的package包/类
@Override
public ManagedNotification[] getManagedNotifications(Class<?> clazz) throws InvalidMetadataException {
	ManagedNotifications notificationsAnn = clazz.getAnnotation(ManagedNotifications.class);
	if(notificationsAnn == null) {
		return new ManagedNotification[0];
	}
	Annotation[] notifications = notificationsAnn.value();
	ManagedNotification[] result = new ManagedNotification[notifications.length];
	for (int i = 0; i < notifications.length; i++) {
		Annotation notification = notifications[i];
		ManagedNotification managedNotification = new ManagedNotification();
		AnnotationBeanUtils.copyPropertiesToBean(notification, managedNotification);
		result[i] = managedNotification;
	}
	return result;
}
 

开发者ID:lamsfoundation,
项目名称:lams,
代码行数:17,
代码来源:AnnotationJmxAttributeSource.java

示例2: getNotificationInfo

点赞 2

import org.springframework.jmx.export.metadata.ManagedNotification; //导入依赖的package包/类
/**
 * 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;
}
 

开发者ID:lamsfoundation,
项目名称:lams,
代码行数:19,
代码来源:MetadataMBeanInfoAssembler.java

示例3: setNotificationInfos

点赞 2

import org.springframework.jmx.export.metadata.ManagedNotification; //导入依赖的package包/类
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;
}
 

开发者ID:lamsfoundation,
项目名称:lams,
代码行数:9,
代码来源:AbstractConfigurableMBeanInfoAssembler.java

示例4: getManagedNotifications

点赞 2

import org.springframework.jmx.export.metadata.ManagedNotification; //导入依赖的package包/类
public ManagedNotification[] getManagedNotifications(Class<?> clazz) throws InvalidMetadataException {
	ManagedNotifications notificationsAnn = clazz.getAnnotation(ManagedNotifications.class);
	if(notificationsAnn == null) {
		return new ManagedNotification[0];
	}
	Annotation[] notifications = notificationsAnn.value();
	ManagedNotification[] result = new ManagedNotification[notifications.length];
	for (int i = 0; i < notifications.length; i++) {
		Annotation notification = notifications[i];
		ManagedNotification managedNotification = new ManagedNotification();
		AnnotationBeanUtils.copyPropertiesToBean(notification, managedNotification);
		result[i] = managedNotification;
	}
	return result;
}
 

开发者ID:deathspeeder,
项目名称:class-guard,
代码行数:16,
代码来源:AnnotationJmxAttributeSource.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)