下面列出了javax.management.MBeanServerConnection#isInstanceOf ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
private static boolean isInstanceOf(MBeanServerConnection connection,
ObjectName objName, String intfName)
throws InstanceNotFoundException, IOException
{
// special case for java.util.logging.LoggingMXBean.
// java.util.logging.LoggingMXBean is deprecated and
// replaced with java.lang.management.PlatformLoggingMXBean,
// so we will consider that any MBean implementing
// java.lang.management.PlatformLoggingMXBean also implements
// java.util.logging.LoggingMXBean.
if ("java.util.logging.LoggingMXBean".equals(intfName)) {
if (connection.isInstanceOf(objName,
PlatformLoggingMXBean.class.getName())) {
return true;
}
}
return connection.isInstanceOf(objName, intfName);
}