equal
deleted
inserted
replaced
49 public class JMX { |
49 public class JMX { |
50 /* Code within this package can prove that by providing this instance of |
50 /* Code within this package can prove that by providing this instance of |
51 * this class. |
51 * this class. |
52 */ |
52 */ |
53 static final JMX proof = new JMX(); |
53 static final JMX proof = new JMX(); |
54 private static final ClassLogger logger = |
|
55 new ClassLogger("javax.management.misc", "JMX"); |
|
56 |
54 |
57 private JMX() {} |
55 private JMX() {} |
58 |
56 |
59 /** |
57 /** |
60 * The name of the <a href="Descriptor.html#defaultValue">{@code |
58 * The name of the <a href="Descriptor.html#defaultValue">{@code |
822 * @throws NotCompliantMBeanException if the given object is not |
820 * @throws NotCompliantMBeanException if the given object is not |
823 * a valid MBean. |
821 * a valid MBean. |
824 */ |
822 */ |
825 public static boolean isNotificationSource(Object mbean) |
823 public static boolean isNotificationSource(Object mbean) |
826 throws NotCompliantMBeanException { |
824 throws NotCompliantMBeanException { |
827 if (mbean instanceof NotificationBroadcaster) |
825 for (int i = 0; i < 2; i++) { |
828 return true; |
826 if (mbean instanceof NotificationBroadcaster || |
829 Object resource = (mbean instanceof DynamicWrapperMBean) ? |
827 MBeanInjector.injectsSendNotification(mbean)) |
830 ((DynamicWrapperMBean) mbean).getWrappedObject() : mbean; |
828 return true; |
831 return (MBeanInjector.injectsSendNotification(resource)); |
829 if (mbean instanceof DynamicWrapperMBean) |
|
830 mbean = ((DynamicWrapperMBean) mbean).getWrappedObject(); |
|
831 else |
|
832 break; |
|
833 } |
|
834 return false; |
832 } |
835 } |
833 |
836 |
834 /** |
837 /** |
835 * <p>Return the version of the JMX specification that a (possibly remote) |
838 * <p>Return the version of the JMX specification that a (possibly remote) |
836 * MBean Server is using. The JMX specification described in this |
839 * MBean Server is using. The JMX specification described in this |