本文整理匯總了Java中javax.management.MBeanServerConnection.isInstanceOf方法的典型用法代碼示例。如果您正苦於以下問題:Java MBeanServerConnection.isInstanceOf方法的具體用法?Java MBeanServerConnection.isInstanceOf怎麽用?Java MBeanServerConnection.isInstanceOf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.management.MBeanServerConnection
的用法示例。
在下文中一共展示了MBeanServerConnection.isInstanceOf方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: isInstanceOf
import javax.management.MBeanServerConnection; //導入方法依賴的package包/類
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);
}