本文整理汇总了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;未经允许,请勿转载。 |
请发表评论