当前位置: 首页>>代码示例>>Java>>正文


Java ModelMBeanInfo.getMBeanDescriptor方法代码示例

本文整理汇总了Java中javax.management.modelmbean.ModelMBeanInfo.getMBeanDescriptor方法的典型用法代码示例。如果您正苦于以下问题:Java ModelMBeanInfo.getMBeanDescriptor方法的具体用法?Java ModelMBeanInfo.getMBeanDescriptor怎么用?Java ModelMBeanInfo.getMBeanDescriptor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.management.modelmbean.ModelMBeanInfo的用法示例。


在下文中一共展示了ModelMBeanInfo.getMBeanDescriptor方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getModelMBeanLogger

import javax.management.modelmbean.ModelMBeanInfo; //导入方法依赖的package包/类
private Logger getModelMBeanLogger(String notificationType) throws MBeanException {
  // Get a copy to avoid synchronization
  ModelMBeanInfo info = getModelMBeanInfo();

  // First look if there is a suitable notification descriptor, otherwise use MBean descriptor
  Descriptor descriptor = null;
  Logger modelMBeanLogger = null;
  if (notificationType != null) {
    descriptor = info.getDescriptor(notificationType, "notification");
    modelMBeanLogger = findLogger(descriptor);
  }

  if (modelMBeanLogger == null) {
    descriptor = info.getMBeanDescriptor();
    modelMBeanLogger = findLogger(descriptor);
    if (modelMBeanLogger != null)
      return modelMBeanLogger;
  }

  return null;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:22,代码来源:MX4JModelMBean.java

示例2: getModelMBeanLogger

import javax.management.modelmbean.ModelMBeanInfo; //导入方法依赖的package包/类
private Logger getModelMBeanLogger(String notificationType) throws MBeanException
{
   // Get a copy to avoid synchronization
   ModelMBeanInfo info = getModelMBeanInfo();

   // First look if there is a suitable notification descriptor, otherwise use MBean descriptor
   Descriptor descriptor = null;
   Logger modelMBeanLogger = null;
   if (notificationType != null)
   {
      descriptor = info.getDescriptor(notificationType, "notification");
      modelMBeanLogger = findLogger(descriptor);
   }

   if (modelMBeanLogger == null)
   {
      descriptor = info.getMBeanDescriptor();
      modelMBeanLogger = findLogger(descriptor);
      if (modelMBeanLogger != null) return modelMBeanLogger;
   }

   return null;
}
 
开发者ID:gemxd,项目名称:gemfirexd-oss,代码行数:24,代码来源:MX4JModelMBean.java

示例3: testManagedResourceDescriptor

import javax.management.modelmbean.ModelMBeanInfo; //导入方法依赖的package包/类
@Test
public void testManagedResourceDescriptor() throws Exception {
	ModelMBeanInfo info = getMBeanInfoFromAssembler();
	Descriptor desc = info.getMBeanDescriptor();

	assertEquals("Logging should be set to true", "true", desc.getFieldValue("log"));
	assertEquals("Log file should be jmx.log", "jmx.log", desc.getFieldValue("logFile"));
	assertEquals("Currency Time Limit should be 15", "15", desc.getFieldValue("currencyTimeLimit"));
	assertEquals("Persist Policy should be OnUpdate", "OnUpdate", desc.getFieldValue("persistPolicy"));
	assertEquals("Persist Period should be 200", "200", desc.getFieldValue("persistPeriod"));
	assertEquals("Persist Location should be foo", "./foo", desc.getFieldValue("persistLocation"));
	assertEquals("Persist Name should be bar", "bar.jmx", desc.getFieldValue("persistName"));
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:14,代码来源:AbstractMetadataAssemblerTests.java

示例4: getMBeanInfo

import javax.management.modelmbean.ModelMBeanInfo; //导入方法依赖的package包/类
/**
 * Create an instance of the {@code ModelMBeanInfoSupport} class supplied with all
 * JMX implementations and populates the metadata through calls to the subclass.
 * @param managedBean the bean that will be exposed (might be an AOP proxy)
 * @param beanKey the key associated with the managed bean
 * @return the populated ModelMBeanInfo instance
 * @throws JMException in case of errors
 * @see #getDescription(Object, String)
 * @see #getAttributeInfo(Object, String)
 * @see #getConstructorInfo(Object, String)
 * @see #getOperationInfo(Object, String)
 * @see #getNotificationInfo(Object, String)
 * @see #populateMBeanDescriptor(javax.management.Descriptor, Object, String)
 */
@Override
public ModelMBeanInfo getMBeanInfo(Object managedBean, String beanKey) throws JMException {
	checkManagedBean(managedBean);
	ModelMBeanInfo info = new ModelMBeanInfoSupport(
			getClassName(managedBean, beanKey), getDescription(managedBean, beanKey),
			getAttributeInfo(managedBean, beanKey), getConstructorInfo(managedBean, beanKey),
			getOperationInfo(managedBean, beanKey), getNotificationInfo(managedBean, beanKey));
	Descriptor desc = info.getMBeanDescriptor();
	populateMBeanDescriptor(desc, managedBean, beanKey);
	info.setMBeanDescriptor(desc);
	return info;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:27,代码来源:AbstractMBeanInfoAssembler.java

示例5: getMBeanInfo

import javax.management.modelmbean.ModelMBeanInfo; //导入方法依赖的package包/类
/**
 * Create an instance of the {@code ModelMBeanInfoSupport} class supplied with all
 * JMX implementations and populates the metadata through calls to the subclass.
 * @param managedBean the bean that will be exposed (might be an AOP proxy)
 * @param beanKey the key associated with the managed bean
 * @return the populated ModelMBeanInfo instance
 * @throws JMException in case of errors
 * @see #getDescription(Object, String)
 * @see #getAttributeInfo(Object, String)
 * @see #getConstructorInfo(Object, String)
 * @see #getOperationInfo(Object, String)
 * @see #getNotificationInfo(Object, String)
 * @see #populateMBeanDescriptor(javax.management.Descriptor, Object, String)
 */
public ModelMBeanInfo getMBeanInfo(Object managedBean, String beanKey) throws JMException {
	checkManagedBean(managedBean);
	ModelMBeanInfo info = new ModelMBeanInfoSupport(
			getClassName(managedBean, beanKey), getDescription(managedBean, beanKey),
			getAttributeInfo(managedBean, beanKey), getConstructorInfo(managedBean, beanKey),
			getOperationInfo(managedBean, beanKey), getNotificationInfo(managedBean, beanKey));
	Descriptor desc = info.getMBeanDescriptor();
	populateMBeanDescriptor(desc, managedBean, beanKey);
	info.setMBeanDescriptor(desc);
	return info;
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:26,代码来源:AbstractMBeanInfoAssembler.java


注:本文中的javax.management.modelmbean.ModelMBeanInfo.getMBeanDescriptor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。