本文整理汇总了Java中javax.management.openmbean.OpenMBeanParameterInfo类的典型用法代码示例。如果您正苦于以下问题:Java OpenMBeanParameterInfo类的具体用法?Java OpenMBeanParameterInfo怎么用?Java OpenMBeanParameterInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OpenMBeanParameterInfo类属于javax.management.openmbean包,在下文中一共展示了OpenMBeanParameterInfo类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: customize
import javax.management.openmbean.OpenMBeanParameterInfo; //导入依赖的package包/类
private static MBeanParameterInfo
customize(MBeanParameterInfo pi,
String name,
String description) {
if (equal(name, pi.getName()) &&
equal(description, pi.getDescription()))
return pi;
else if (pi instanceof OpenMBeanParameterInfo) {
OpenMBeanParameterInfo opi = (OpenMBeanParameterInfo) pi;
return new OpenMBeanParameterInfoSupport(name,
description,
opi.getOpenType(),
pi.getDescriptor());
} else {
return new MBeanParameterInfo(name,
pi.getType(),
description,
pi.getDescriptor());
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:StandardMBean.java
示例2: getMBeanInfo
import javax.management.openmbean.OpenMBeanParameterInfo; //导入依赖的package包/类
@Override
public MBeanInfo getMBeanInfo() {
ArrayList<OpenMBeanAttributeInfoSupport> attributes = new ArrayList<>();
attributes.add(new OpenMBeanAttributeInfoSupport("enabled", "enabled", SimpleType.BOOLEAN, true, true, true));
for (String type : registry.getTypes()) {
attributes.add(new OpenMBeanAttributeInfoSupport(type, type, getCompositeType(type), true, false, false));
}
OpenMBeanParameterInfo[] params = new OpenMBeanParameterInfoSupport[0];
OpenMBeanOperationInfoSupport reset = new OpenMBeanOperationInfoSupport("reset", "Reset all Metrics", params,
SimpleType.VOID, MBeanOperationInfo.ACTION);
OpenMBeanInfoSupport PSOMBInfo = new OpenMBeanInfoSupport(this.getClass().getName(), description,
attributes.toArray(new OpenMBeanAttributeInfoSupport[0]), new OpenMBeanConstructorInfoSupport[0],
new OpenMBeanOperationInfoSupport[] { reset }, new MBeanNotificationInfo[0]);
return PSOMBInfo;
}
开发者ID:mevdschee,项目名称:tqdev-metrics,代码行数:21,代码来源:JmxReporter.java
示例3: getOperation
import javax.management.openmbean.OpenMBeanParameterInfo; //导入依赖的package包/类
private OpenMBeanOperationInfo getOperation(String name, OpenMBeanParameterInfo addWildcardChildName, OperationEntry entry) {
ModelNode opNode = entry.getDescriptionProvider().getModelDescription(null);
OpenMBeanParameterInfo[] params = getParameterInfos(opNode);
if (addWildcardChildName != null) {
OpenMBeanParameterInfo[] newParams = new OpenMBeanParameterInfo[params.length + 1];
newParams[0] = addWildcardChildName;
System.arraycopy(params, 0, newParams, 1, params.length);
params = newParams;
}
return new OpenMBeanOperationInfoSupport(
name,
getDescription(opNode),
params,
getReturnType(opNode),
entry.getFlags().contains(Flag.READ_ONLY) ? MBeanOperationInfo.INFO : MBeanOperationInfo.UNKNOWN,
createOperationDescriptor());
}
开发者ID:wildfly,项目名称:wildfly-core,代码行数:18,代码来源:MBeanInfoFactory.java
示例4: paramsToOpenParams
import javax.management.openmbean.OpenMBeanParameterInfo; //导入依赖的package包/类
private static OpenMBeanParameterInfo[]
paramsToOpenParams(MBeanParameterInfo[] params) {
if (params instanceof OpenMBeanParameterInfo[])
return (OpenMBeanParameterInfo[]) params;
OpenMBeanParameterInfo[] oparams =
new OpenMBeanParameterInfoSupport[params.length];
System.arraycopy(params, 0, oparams, 0, params.length);
return oparams;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:StandardMBean.java
注:本文中的javax.management.openmbean.OpenMBeanParameterInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论