Java Code Examples for javax.management.NotificationBroadcaster#removeNotificationListener()
The following examples show how to use
javax.management.NotificationBroadcaster#removeNotificationListener() .
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: OldMBeanServerTest.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void removeNotificationListener( ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.removeNotificationListener(wrappedListener); }
Example 2
Source File: OldMBeanServerTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public void removeNotificationListener( ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.removeNotificationListener(wrappedListener); }
Example 3
Source File: OldMBeanServerTest.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void removeNotificationListener( ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.removeNotificationListener(wrappedListener); }
Example 4
Source File: OldMBeanServerTest.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void removeNotificationListener( ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.removeNotificationListener(wrappedListener); }
Example 5
Source File: OldMBeanServerTest.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public void removeNotificationListener( ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.removeNotificationListener(wrappedListener); }
Example 6
Source File: OldMBeanServerTest.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public void removeNotificationListener( ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.removeNotificationListener(wrappedListener); }
Example 7
Source File: OldMBeanServerTest.java From hottub with GNU General Public License v2.0 | 5 votes |
public void removeNotificationListener( ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.removeNotificationListener(wrappedListener); }
Example 8
Source File: OldMBeanServerTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public void removeNotificationListener( ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.removeNotificationListener(wrappedListener); }
Example 9
Source File: OldMBeanServerTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void removeNotificationListener( ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.removeNotificationListener(wrappedListener); }
Example 10
Source File: DefaultMBeanServerInterceptor.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback, boolean removeAll) throws InstanceNotFoundException, ListenerNotFoundException { if (MBEANSERVER_LOGGER.isLoggable(Level.TRACE)) { MBEANSERVER_LOGGER.log(Level.TRACE, "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "removeNotificationListener"); /* We could simplify the code by assigning broadcaster after assigning listenerWrapper, but that would change the error behavior when both the broadcaster and the listener are erroneous. */ Class<? extends NotificationBroadcaster> reqClass = removeAll ? NotificationBroadcaster.class : NotificationEmitter.class; NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, reqClass); NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, false); if (listenerWrapper == null) throw new ListenerNotFoundException("Unknown listener"); if (removeAll) broadcaster.removeNotificationListener(listenerWrapper); else { NotificationEmitter emitter = (NotificationEmitter) broadcaster; emitter.removeNotificationListener(listenerWrapper, filter, handback); } }
Example 11
Source File: OldMBeanServerTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void removeNotificationListener( ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException { NotificationBroadcaster userMBean = (NotificationBroadcaster) getUserMBean(name); NotificationListener wrappedListener = wrappedListener(name, userMBean, listener); userMBean.removeNotificationListener(wrappedListener); }
Example 12
Source File: DefaultMBeanServerInterceptor.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
private void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback, boolean removeAll) throws InstanceNotFoundException, ListenerNotFoundException { if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "removeNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "removeNotificationListener"); /* We could simplify the code by assigning broadcaster after assigning listenerWrapper, but that would change the error behavior when both the broadcaster and the listener are erroneous. */ Class<? extends NotificationBroadcaster> reqClass = removeAll ? NotificationBroadcaster.class : NotificationEmitter.class; NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, reqClass); NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, false); if (listenerWrapper == null) throw new ListenerNotFoundException("Unknown listener"); if (removeAll) broadcaster.removeNotificationListener(listenerWrapper); else { NotificationEmitter emitter = (NotificationEmitter) broadcaster; emitter.removeNotificationListener(listenerWrapper, filter, handback); } }
Example 13
Source File: DefaultMBeanServerInterceptor.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
private void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback, boolean removeAll) throws InstanceNotFoundException, ListenerNotFoundException { if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "removeNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "removeNotificationListener"); /* We could simplify the code by assigning broadcaster after assigning listenerWrapper, but that would change the error behavior when both the broadcaster and the listener are erroneous. */ Class<? extends NotificationBroadcaster> reqClass = removeAll ? NotificationBroadcaster.class : NotificationEmitter.class; NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, reqClass); NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, false); if (listenerWrapper == null) throw new ListenerNotFoundException("Unknown listener"); if (removeAll) broadcaster.removeNotificationListener(listenerWrapper); else { NotificationEmitter emitter = (NotificationEmitter) broadcaster; emitter.removeNotificationListener(listenerWrapper, filter, handback); } }
Example 14
Source File: DefaultMBeanServerInterceptor.java From hottub with GNU General Public License v2.0 | 4 votes |
private void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback, boolean removeAll) throws InstanceNotFoundException, ListenerNotFoundException { if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "removeNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "removeNotificationListener"); /* We could simplify the code by assigning broadcaster after assigning listenerWrapper, but that would change the error behavior when both the broadcaster and the listener are erroneous. */ Class<? extends NotificationBroadcaster> reqClass = removeAll ? NotificationBroadcaster.class : NotificationEmitter.class; NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, reqClass); NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, false); if (listenerWrapper == null) throw new ListenerNotFoundException("Unknown listener"); if (removeAll) broadcaster.removeNotificationListener(listenerWrapper); else { NotificationEmitter emitter = (NotificationEmitter) broadcaster; emitter.removeNotificationListener(listenerWrapper, filter, handback); } }
Example 15
Source File: DefaultMBeanServerInterceptor.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
private void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback, boolean removeAll) throws InstanceNotFoundException, ListenerNotFoundException { if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "removeNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "removeNotificationListener"); /* We could simplify the code by assigning broadcaster after assigning listenerWrapper, but that would change the error behavior when both the broadcaster and the listener are erroneous. */ Class<? extends NotificationBroadcaster> reqClass = removeAll ? NotificationBroadcaster.class : NotificationEmitter.class; NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, reqClass); NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, false); if (listenerWrapper == null) throw new ListenerNotFoundException("Unknown listener"); if (removeAll) broadcaster.removeNotificationListener(listenerWrapper); else { NotificationEmitter emitter = (NotificationEmitter) broadcaster; emitter.removeNotificationListener(listenerWrapper, filter, handback); } }
Example 16
Source File: DefaultMBeanServerInterceptor.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
private void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback, boolean removeAll) throws InstanceNotFoundException, ListenerNotFoundException { if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "removeNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "removeNotificationListener"); /* We could simplify the code by assigning broadcaster after assigning listenerWrapper, but that would change the error behavior when both the broadcaster and the listener are erroneous. */ Class<? extends NotificationBroadcaster> reqClass = removeAll ? NotificationBroadcaster.class : NotificationEmitter.class; NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, reqClass); NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, false); if (listenerWrapper == null) throw new ListenerNotFoundException("Unknown listener"); if (removeAll) broadcaster.removeNotificationListener(listenerWrapper); else { NotificationEmitter emitter = (NotificationEmitter) broadcaster; emitter.removeNotificationListener(listenerWrapper, filter, handback); } }
Example 17
Source File: DefaultMBeanServerInterceptor.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
private void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback, boolean removeAll) throws InstanceNotFoundException, ListenerNotFoundException { if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "removeNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "removeNotificationListener"); /* We could simplify the code by assigning broadcaster after assigning listenerWrapper, but that would change the error behavior when both the broadcaster and the listener are erroneous. */ Class<? extends NotificationBroadcaster> reqClass = removeAll ? NotificationBroadcaster.class : NotificationEmitter.class; NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, reqClass); NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, false); if (listenerWrapper == null) throw new ListenerNotFoundException("Unknown listener"); if (removeAll) broadcaster.removeNotificationListener(listenerWrapper); else { NotificationEmitter emitter = (NotificationEmitter) broadcaster; emitter.removeNotificationListener(listenerWrapper, filter, handback); } }
Example 18
Source File: DefaultMBeanServerInterceptor.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
private void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback, boolean removeAll) throws InstanceNotFoundException, ListenerNotFoundException { if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "removeNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "removeNotificationListener"); /* We could simplify the code by assigning broadcaster after assigning listenerWrapper, but that would change the error behavior when both the broadcaster and the listener are erroneous. */ Class<? extends NotificationBroadcaster> reqClass = removeAll ? NotificationBroadcaster.class : NotificationEmitter.class; NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, reqClass); NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, false); if (listenerWrapper == null) throw new ListenerNotFoundException("Unknown listener"); if (removeAll) broadcaster.removeNotificationListener(listenerWrapper); else { NotificationEmitter emitter = (NotificationEmitter) broadcaster; emitter.removeNotificationListener(listenerWrapper, filter, handback); } }
Example 19
Source File: DefaultMBeanServerInterceptor.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
private void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback, boolean removeAll) throws InstanceNotFoundException, ListenerNotFoundException { if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "removeNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "removeNotificationListener"); /* We could simplify the code by assigning broadcaster after assigning listenerWrapper, but that would change the error behavior when both the broadcaster and the listener are erroneous. */ Class<? extends NotificationBroadcaster> reqClass = removeAll ? NotificationBroadcaster.class : NotificationEmitter.class; NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, reqClass); NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, false); if (listenerWrapper == null) throw new ListenerNotFoundException("Unknown listener"); if (removeAll) broadcaster.removeNotificationListener(listenerWrapper); else { NotificationEmitter emitter = (NotificationEmitter) broadcaster; emitter.removeNotificationListener(listenerWrapper, filter, handback); } }
Example 20
Source File: DefaultMBeanServerInterceptor.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
private void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback, boolean removeAll) throws InstanceNotFoundException, ListenerNotFoundException { if (MBEANSERVER_LOGGER.isLoggable(Level.FINER)) { MBEANSERVER_LOGGER.logp(Level.FINER, DefaultMBeanServerInterceptor.class.getName(), "removeNotificationListener", "ObjectName = " + name); } DynamicMBean instance = getMBean(name); checkMBeanPermission(instance, null, name, "removeNotificationListener"); /* We could simplify the code by assigning broadcaster after assigning listenerWrapper, but that would change the error behavior when both the broadcaster and the listener are erroneous. */ Class<? extends NotificationBroadcaster> reqClass = removeAll ? NotificationBroadcaster.class : NotificationEmitter.class; NotificationBroadcaster broadcaster = getNotificationBroadcaster(name, instance, reqClass); NotificationListener listenerWrapper = getListenerWrapper(listener, name, instance, false); if (listenerWrapper == null) throw new ListenerNotFoundException("Unknown listener"); if (removeAll) broadcaster.removeNotificationListener(listenerWrapper); else { NotificationEmitter emitter = (NotificationEmitter) broadcaster; emitter.removeNotificationListener(listenerWrapper, filter, handback); } }