Java Code Examples for javax.management.NotificationBroadcaster#addNotificationListener()
The following examples show how to use
javax.management.NotificationBroadcaster#addNotificationListener() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultMBeanServerInterceptor.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { // ------------------------------ // ------------------------------ if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "addNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "addNotificationListener"); NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, NotificationBroadcaster.class); // ------------------ // Check listener // ------------------ if (listener == null) { throw new RuntimeOperationsException(new IllegalArgumentException("Null listener"),"Null listener"); } NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, true); broadcaster.addNotificationListener(listenerWrapper, filter, handback); }
Example 2
Source File: OldMBeanServerTest.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener( ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.addNotificationListener(wrappedListener, filter, handback); }
Example 3
Source File: DefaultMBeanServerInterceptor.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { // ------------------------------ // ------------------------------ if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "addNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "addNotificationListener"); NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, NotificationBroadcaster.class); // ------------------ // Check listener // ------------------ if (listener == null) { throw new RuntimeOperationsException(new IllegalArgumentException("Null listener"),"Null listener"); } NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, true); broadcaster.addNotificationListener(listenerWrapper, filter, handback); }
Example 4
Source File: OldMBeanServerTest.java From hottub with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener( ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.addNotificationListener(wrappedListener, filter, handback); }
Example 5
Source File: OldMBeanServerTest.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener( ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.addNotificationListener(wrappedListener, filter, handback); }
Example 6
Source File: OldMBeanServerTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener( ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.addNotificationListener(wrappedListener, filter, handback); }
Example 7
Source File: DefaultMBeanServerInterceptor.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { // ------------------------------ // ------------------------------ if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "addNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "addNotificationListener"); NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, NotificationBroadcaster.class); // ------------------ // Check listener // ------------------ if (listener == null) { throw new RuntimeOperationsException(new IllegalArgumentException("Null listener"),"Null listener"); } NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, true); broadcaster.addNotificationListener(listenerWrapper, filter, handback); }
Example 8
Source File: OldMBeanServerTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener( ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.addNotificationListener(wrappedListener, filter, handback); }
Example 9
Source File: DefaultMBeanServerInterceptor.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { // ------------------------------ // ------------------------------ if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "addNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "addNotificationListener"); NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, NotificationBroadcaster.class); // ------------------ // Check listener // ------------------ if (listener == null) { throw new RuntimeOperationsException(new IllegalArgumentException("Null listener"),"Null listener"); } NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, true); broadcaster.addNotificationListener(listenerWrapper, filter, handback); }
Example 10
Source File: OldMBeanServerTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener( ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.addNotificationListener(wrappedListener, filter, handback); }
Example 11
Source File: OldMBeanServerTest.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener( ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.addNotificationListener(wrappedListener, filter, handback); }
Example 12
Source File: OldMBeanServerTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener( ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.addNotificationListener(wrappedListener, filter, handback); }
Example 13
Source File: DefaultMBeanServerInterceptor.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { // ------------------------------ // ------------------------------ if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "addNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "addNotificationListener"); NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, NotificationBroadcaster.class); // ------------------ // Check listener // ------------------ if (listener == null) { throw new RuntimeOperationsException(new IllegalArgumentException("Null listener"),"Null listener"); } NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, true); broadcaster.addNotificationListener(listenerWrapper, filter, handback); }
Example 14
Source File: DefaultMBeanServerInterceptor.java From JDKSourceCode1.8 with MIT License | 5 votes |
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { // ------------------------------ // ------------------------------ if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "addNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "addNotificationListener"); NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, NotificationBroadcaster.class); // ------------------ // Check listener // ------------------ if (listener == null) { throw new RuntimeOperationsException(new IllegalArgumentException("Null listener"),"Null listener"); } NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, true); broadcaster.addNotificationListener(listenerWrapper, filter, handback); }
Example 15
Source File: OldMBeanServerTest.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener( ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.addNotificationListener(wrappedListener, filter, handback); }
Example 16
Source File: DefaultMBeanServerInterceptor.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { // ------------------------------ // ------------------------------ if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "addNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "addNotificationListener"); NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, NotificationBroadcaster.class); // ------------------ // Check listener // ------------------ if (listener == null) { throw new RuntimeOperationsException(new IllegalArgumentException("Null listener"),"Null listener"); } NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, true); broadcaster.addNotificationListener(listenerWrapper, filter, handback); }
Example 17
Source File: OldMBeanServerTest.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener( ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.addNotificationListener(wrappedListener, filter, handback); }
Example 18
Source File: DefaultMBeanServerInterceptor.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { // ------------------------------ // ------------------------------ if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "addNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "addNotificationListener"); NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, NotificationBroadcaster.class); // ------------------ // Check listener // ------------------ if (listener == null) { throw new RuntimeOperationsException(new IllegalArgumentException("Null listener"),"Null listener"); } NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, true); broadcaster.addNotificationListener(listenerWrapper, filter, handback); }
Example 19
Source File: OldMBeanServerTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener( ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.addNotificationListener(wrappedListener, filter, handback); }
Example 20
Source File: DefaultMBeanServerInterceptor.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException { // ------------------------------ // ------------------------------ if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "addNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "addNotificationListener"); NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, NotificationBroadcaster.class); // ------------------ // Check listener // ------------------ if (listener == null) { throw new RuntimeOperationsException(new IllegalArgumentException("Null listener"),"Null listener"); } NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, true); broadcaster.addNotificationListener(listenerWrapper, filter, handback); }