コード例 #1
0
 private static void checkPlatformMBeans() throws Exception {
   MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
   Set<ObjectName> mbeanNames = mbs.queryNames(null, null);
   for (ObjectName name : mbeanNames) {
     if (!mbs.isInstanceOf(name, NotificationBroadcaster.class.getName())) {
       System.out.println(name + ": not a NotificationBroadcaster");
     } else {
       MBeanInfo mbi = mbs.getMBeanInfo(name);
       check(name.toString(), mbi.getNotifications());
     }
   }
 }
コード例 #2
0
 public ExoticMBeanInfo(MBeanInfo mbi) {
   super(
       mbi.getClassName(),
       mbi.getDescription(),
       mbi.getAttributes(),
       mbi.getConstructors(),
       mbi.getOperations(),
       mbi.getNotifications());
 }