/**
* Instantiates and registers a StandardMBean in the MBean server.
*
* @param implementationClassName
* The implementation class name of the MBean.
* @param interfaceClassName
* The management interface class name of the MBean.
* @param isMXBean
* If true, the resultant MBean is an MXBean.
* @param name
* The object name of the StandardMBean.
*/
@SuppressWarnings("unchecked")
public void createStandardMBean(
String implementationClassName,
String interfaceClassName,
boolean isMXBean,
ObjectName name)
throws Exception {
Object implementation =
Class.forName(implementationClassName).newInstance();
Class<Object> interfaceClass = interfaceClassName == null ? null :
(Class<Object>)Class.forName(interfaceClassName);
// Create the StandardMBean
StandardMBean standardMBean = new StandardMBean(
implementation,
interfaceClass,
isMXBean);
// Register the StandardMBean
mbeanServer.registerMBean(standardMBean, name);
}
ServerDelegate.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:openjdk9
作者:
评论列表
文章目录