• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java InvalidMetadataException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getManagedOperationParameters

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
@Override
public ManagedOperationParameter[] getManagedOperationParameters(Method method)
		throws InvalidMetadataException {

	ManagedOperationParameters params = AnnotationUtils.findAnnotation(method, ManagedOperationParameters.class);
	ManagedOperationParameter[] result = null;
	if (params == null) {
		result = new ManagedOperationParameter[0];
	}
	else {
		Annotation[] paramData = params.value();
		result = new ManagedOperationParameter[paramData.length];
		for (int i = 0; i < paramData.length; i++) {
			Annotation annotation = paramData[i];
			ManagedOperationParameter managedOperationParameter = new ManagedOperationParameter();
			AnnotationBeanUtils.copyPropertiesToBean(annotation, managedOperationParameter);
			result[i] = managedOperationParameter;
		}
	}
	return result;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:22,代码来源:AnnotationJmxAttributeSource.java


示例2: getManagedNotifications

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的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


示例3: getManagedOperationParameters

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
public ManagedOperationParameter[] getManagedOperationParameters(Method method)
		throws InvalidMetadataException {

	ManagedOperationParameters params = AnnotationUtils.findAnnotation(method, ManagedOperationParameters.class);
	ManagedOperationParameter[] result = null;
	if (params == null) {
		result = new ManagedOperationParameter[0];
	}
	else {
		Annotation[] paramData = params.value();
		result = new ManagedOperationParameter[paramData.length];
		for (int i = 0; i < paramData.length; i++) {
			Annotation annotation = paramData[i];
			ManagedOperationParameter managedOperationParameter = new ManagedOperationParameter();
			AnnotationBeanUtils.copyPropertiesToBean(annotation, managedOperationParameter);
			result[i] = managedOperationParameter;
		}
	}
	return result;
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:21,代码来源:AnnotationJmxAttributeSource.java


示例4: getManagedAttribute

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
@Override
public ManagedAttribute getManagedAttribute(Method method) throws InvalidMetadataException {
	org.springframework.jmx.export.annotation.ManagedAttribute ann =
			AnnotationUtils.findAnnotation(method, org.springframework.jmx.export.annotation.ManagedAttribute.class);
	if (ann == null) {
		return null;
	}
	ManagedAttribute managedAttribute = new ManagedAttribute();
	AnnotationBeanUtils.copyPropertiesToBean(ann, managedAttribute, "defaultValue");
	if (ann.defaultValue().length() > 0) {
		managedAttribute.setDefaultValue(ann.defaultValue());
	}
	return managedAttribute;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:AnnotationJmxAttributeSource.java


示例5: getManagedMetric

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
@Override
public ManagedMetric getManagedMetric(Method method) throws InvalidMetadataException {
	org.springframework.jmx.export.annotation.ManagedMetric ann =
			AnnotationUtils.findAnnotation(method, org.springframework.jmx.export.annotation.ManagedMetric.class);
	if (ann == null) {
		return null;
	}
	ManagedMetric managedMetric = new ManagedMetric();
	AnnotationBeanUtils.copyPropertiesToBean(ann, managedMetric);
	return managedMetric;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:AnnotationJmxAttributeSource.java


示例6: getManagedOperation

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
@Override
public ManagedOperation getManagedOperation(Method method) throws InvalidMetadataException {
	Annotation ann = AnnotationUtils.findAnnotation(method, org.springframework.jmx.export.annotation.ManagedOperation.class);
	if (ann == null) {
		return null;
	}
	ManagedOperation op = new ManagedOperation();
	AnnotationBeanUtils.copyPropertiesToBean(ann, op);
	return op;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:11,代码来源:AnnotationJmxAttributeSource.java


示例7: populateMBeanDescriptor

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
/**
 * Adds descriptor fields from the {@code ManagedResource} attribute
 * to the MBean descriptor. Specifically, adds the {@code currencyTimeLimit},
 * {@code persistPolicy}, {@code persistPeriod}, {@code persistLocation}
 * and {@code persistName} descriptor fields if they are present in the metadata.
 */
@Override
protected void populateMBeanDescriptor(Descriptor desc, Object managedBean, String beanKey) {
	ManagedResource mr = this.attributeSource.getManagedResource(getClassToExpose(managedBean));
	if (mr == null) {
		throw new InvalidMetadataException(
				"No ManagedResource attribute found for class: " + getClassToExpose(managedBean));
	}

	applyCurrencyTimeLimit(desc, mr.getCurrencyTimeLimit());

	if (mr.isLog()) {
		desc.setField(FIELD_LOG, "true");
	}
	if (StringUtils.hasLength(mr.getLogFile())) {
		desc.setField(FIELD_LOG_FILE, mr.getLogFile());
	}

	if (StringUtils.hasLength(mr.getPersistPolicy())) {
		desc.setField(FIELD_PERSIST_POLICY, mr.getPersistPolicy());
	}
	if (mr.getPersistPeriod() >= 0) {
		desc.setField(FIELD_PERSIST_PERIOD, Integer.toString(mr.getPersistPeriod()));
	}
	if (StringUtils.hasLength(mr.getPersistName())) {
		desc.setField(FIELD_PERSIST_NAME, mr.getPersistName());
	}
	if (StringUtils.hasLength(mr.getPersistLocation())) {
		desc.setField(FIELD_PERSIST_LOCATION, mr.getPersistLocation());
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:37,代码来源:MetadataMBeanInfoAssembler.java


示例8: getManagedResource

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
@Override
public org.springframework.jmx.export.metadata.ManagedResource getManagedResource(Class<?> beanClass) throws InvalidMetadataException {
	ManagedResource ann = AnnotationUtils.findAnnotation(beanClass, ManagedResource.class);
	if (ann == null) {
		return null;
	}
	org.springframework.jmx.export.metadata.ManagedResource managedResource = new org.springframework.jmx.export.metadata.ManagedResource();
	AnnotationBeanUtils.copyPropertiesToBean(ann, managedResource, this.embeddedValueResolver);
	return managedResource;
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:11,代码来源:AnnotationJmxAttributeSource.java


示例9: getManagedAttribute

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
@Override
public org.springframework.jmx.export.metadata.ManagedAttribute getManagedAttribute(Method method) throws InvalidMetadataException {
	ManagedAttribute ann = AnnotationUtils.findAnnotation(method, ManagedAttribute.class);
	if (ann == null) {
		return null;
	}
	org.springframework.jmx.export.metadata.ManagedAttribute managedAttribute = new org.springframework.jmx.export.metadata.ManagedAttribute();
	AnnotationBeanUtils.copyPropertiesToBean(ann, managedAttribute, "defaultValue");
	if (ann.defaultValue().length() > 0) {
		managedAttribute.setDefaultValue(ann.defaultValue());
	}
	return managedAttribute;
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:14,代码来源:AnnotationJmxAttributeSource.java


示例10: getManagedOperationParameters

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
@Override
public org.springframework.jmx.export.metadata.ManagedOperationParameter[] getManagedOperationParameters(Method method)
		throws InvalidMetadataException {

	Set<ManagedOperationParameter> anns = AnnotationUtils.getRepeatableAnnotations(
			method, ManagedOperationParameter.class, ManagedOperationParameters.class);
	return copyPropertiesToBeanArray(anns, org.springframework.jmx.export.metadata.ManagedOperationParameter.class);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:9,代码来源:AnnotationJmxAttributeSource.java


示例11: getManagedNotifications

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
@Override
public org.springframework.jmx.export.metadata.ManagedNotification[] getManagedNotifications(Class<?> clazz)
		throws InvalidMetadataException {

	Set<ManagedNotification> anns = AnnotationUtils.getRepeatableAnnotations(
			clazz, ManagedNotification.class, ManagedNotifications.class);
	return copyPropertiesToBeanArray(anns, org.springframework.jmx.export.metadata.ManagedNotification.class);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:9,代码来源:AnnotationJmxAttributeSource.java


示例12: getManagedResource

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
@Override
public org.springframework.jmx.export.metadata.ManagedResource getManagedResource(Class<?> beanClass) throws InvalidMetadataException {
	ManagedResource ann = AnnotationUtils.findAnnotation(beanClass, ManagedResource.class);
	if (ann == null) {
		return null;
	}
	Class<?> declaringClass = AnnotationUtils.findAnnotationDeclaringClass(ManagedResource.class, beanClass);
	Class<?> target = (declaringClass != null && !declaringClass.isInterface() ? declaringClass : beanClass);
	if (!Modifier.isPublic(target.getModifiers())) {
		throw new InvalidMetadataException("@ManagedResource class '" + target.getName() + "' must be public");
	}
	org.springframework.jmx.export.metadata.ManagedResource managedResource = new org.springframework.jmx.export.metadata.ManagedResource();
	AnnotationBeanUtils.copyPropertiesToBean(ann, managedResource, this.embeddedValueResolver);
	return managedResource;
}
 
开发者ID:txazo,项目名称:spring,代码行数:16,代码来源:AnnotationJmxAttributeSource.java


示例13: getManagedResource

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public ManagedResource getManagedResource(Class beanClass) throws InvalidMetadataException {
    ManagedResource resource = super.getManagedResource(beanClass);
    if (resource != null && appName != null) {
        String objectName = resource.getObjectName();
        objectName += "." + appName;
        resource.setObjectName(objectName);
    }
    return resource;
}
 
开发者ID:passion1014,项目名称:metaworks_framework,代码行数:12,代码来源:AnnotationJmxAttributeSource.java


示例14: getManagedAttribute

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
public ManagedAttribute getManagedAttribute(Method method) throws InvalidMetadataException {
	org.springframework.jmx.export.annotation.ManagedAttribute ann =
			AnnotationUtils.findAnnotation(method, org.springframework.jmx.export.annotation.ManagedAttribute.class);
	if (ann == null) {
		return null;
	}
	ManagedAttribute managedAttribute = new ManagedAttribute();
	AnnotationBeanUtils.copyPropertiesToBean(ann, managedAttribute, "defaultValue");
	if (ann.defaultValue().length() > 0) {
		managedAttribute.setDefaultValue(ann.defaultValue());
	}
	return managedAttribute;
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:14,代码来源:AnnotationJmxAttributeSource.java


示例15: getManagedMetric

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
public ManagedMetric getManagedMetric(Method method) throws InvalidMetadataException {
	org.springframework.jmx.export.annotation.ManagedMetric ann =
			AnnotationUtils.findAnnotation(method, org.springframework.jmx.export.annotation.ManagedMetric.class);
	if (ann == null) {
		return null;
	}
	ManagedMetric managedMetric = new ManagedMetric();
	AnnotationBeanUtils.copyPropertiesToBean(ann, managedMetric);
	return managedMetric;
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:11,代码来源:AnnotationJmxAttributeSource.java


示例16: getManagedOperation

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
public ManagedOperation getManagedOperation(Method method) throws InvalidMetadataException {
	Annotation ann = AnnotationUtils.findAnnotation(method, org.springframework.jmx.export.annotation.ManagedOperation.class);
	if (ann == null) {
		return null;
	}
	ManagedOperation op = new ManagedOperation();
	AnnotationBeanUtils.copyPropertiesToBean(ann, op);
	return op;
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:10,代码来源:AnnotationJmxAttributeSource.java


示例17: getManagedNotifications

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的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


示例18: getManagedMetric

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
@Override
public org.springframework.jmx.export.metadata.ManagedMetric getManagedMetric(Method method) throws InvalidMetadataException {
	ManagedMetric ann = AnnotationUtils.findAnnotation(method, ManagedMetric.class);
	return copyPropertiesToBean(ann, org.springframework.jmx.export.metadata.ManagedMetric.class);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:6,代码来源:AnnotationJmxAttributeSource.java


示例19: getManagedOperation

import org.springframework.jmx.export.metadata.InvalidMetadataException; //导入依赖的package包/类
@Override
public org.springframework.jmx.export.metadata.ManagedOperation getManagedOperation(Method method) throws InvalidMetadataException {
	ManagedOperation ann = AnnotationUtils.findAnnotation(method, ManagedOperation.class);
	return copyPropertiesToBean(ann, org.springframework.jmx.export.metadata.ManagedOperation.class);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:6,代码来源:AnnotationJmxAttributeSource.java



注:本文中的org.springframework.jmx.export.metadata.InvalidMetadataException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PdfNumber类代码示例发布时间:2022-05-23
下一篇:
Java ModeEnum类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap