public void addNotificationListener(NotificationListener listener, NotificationFilter filter, java.lang.Object handback) { nbs.addNotificationListener(listener, filter, handback); }
@Override public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException { m_generalBroadcaster.addNotificationListener(listener, filter, handback); }
ObjectName addLoggerMBean(Logger logger) { String name = logger.getName(); ObjectName objectName = null; try { LoggerDynamicMBean loggerMBean = new LoggerDynamicMBean(logger); objectName = new ObjectName("log4j", "logger", name); if (!server.isRegistered(objectName)) { registerMBean(loggerMBean, objectName); NotificationFilterSupport nfs = new NotificationFilterSupport(); nfs.enableType(ADD_APPENDER + logger.getName()); log.debug("---Adding logger [" + name + "] as listener."); nbs.addNotificationListener(loggerMBean, nfs, null); vAttributes.add(new MBeanAttributeInfo("logger=" + name, "javax.management.ObjectName", "The " + name + " logger.", true, true, // this makes the object // clickable false)); } } catch(JMException e) { log.error("Could not add loggerMBean for ["+name+"].", e); } catch(RuntimeException e) { log.error("Could not add loggerMBean for ["+name+"].", e); } return objectName; }
NotificationFilter filter = (NotificationFilter) args[1]; Object handback = args[2]; emitter.addNotificationListener(listener, filter, handback); delegateToFucntionService(objectName, methodName, null, signature); return null;
@Override public void addAttributeChangeNotificationListener(NotificationListener listener, String attributeName, Object handback) throws MBeanException, RuntimeOperationsException, IllegalArgumentException { if (listener == null) throw new RuntimeOperationsException(new IllegalArgumentException( "Listener cannot be null.")); AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter(); if (attributeName != null) { filter.enableAttribute(attributeName); } else { MBeanAttributeInfo[] ai = m_modelMBeanInfo.getAttributes(); for (int i = 0; i < ai.length; i++) { Descriptor d = ((ModelMBeanAttributeInfo) ai[i]).getDescriptor(); filter.enableAttribute((String) d.getFieldValue("name")); } } getAttributeChangeBroadcaster().addNotificationListener(listener, filter, handback); Logger logger = getLogger(); if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Listener " + listener + " for attribute " + attributeName + " added successfully, handback is " + handback); }
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, java.lang.Object handback) { nbs.addNotificationListener(listener, filter, handback); }
@Override public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException { notifier.addNotificationListener(listener, filter, handback); }
ObjectName addLoggerMBean(Logger logger) { String name = logger.getName(); ObjectName objectName = null; try { LoggerDynamicMBean loggerMBean = new LoggerDynamicMBean(logger); objectName = new ObjectName("log4j", "logger", name); if (!server.isRegistered(objectName)) { registerMBean(loggerMBean, objectName); NotificationFilterSupport nfs = new NotificationFilterSupport(); nfs.enableType(ADD_APPENDER + logger.getName()); log.debug("---Adding logger [" + name + "] as listener."); nbs.addNotificationListener(loggerMBean, nfs, null); vAttributes.add(new MBeanAttributeInfo("logger=" + name, "javax.management.ObjectName", "The " + name + " logger.", true, true, // this makes the object // clickable false)); } } catch(JMException e) { log.error("Could not add loggerMBean for ["+name+"].", e); } catch(RuntimeException e) { log.error("Could not add loggerMBean for ["+name+"].", e); } return objectName; }
/** * Add a JMX-NotificationListener * @see javax.management.NotificationBroadcaster#addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) */ @Override public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object object) throws IllegalArgumentException { broadcaster.addNotificationListener(listener,filter,object); }
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, java.lang.Object handback) { nbs.addNotificationListener(listener, filter, handback); }
public void addNotificationListener(final NotificationListener listener, final NotificationFilter filter, final Object handback) throws IllegalArgumentException { broadcaster.addNotificationListener(listener, filter, handback); }
@Override public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object object) throws IllegalArgumentException { broadcaster.addNotificationListener(listener,filter,object); }
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) { _broadcaster.addNotificationListener(listener, filter, handback); }
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) { _broadcaster.addNotificationListener(listener, filter, handback); }
/** * Add a JMX NotificationListener * @see javax.management.NotificationBroadcaster#addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) */ @Override public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object object) throws IllegalArgumentException { broadcaster.addNotificationListener(listener,filter,object); }
@Override public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object object) throws IllegalArgumentException { broadcaster.addNotificationListener(listener,filter,object); }
@Override public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object object) throws IllegalArgumentException { broadcaster.addNotificationListener(listener,filter,object); }
@Override public void addNotificationListener(NotificationListener notificationListener, NotificationFilter notificationFilter, Object object) throws IllegalArgumentException { super.addNotificationListener(notificationListener, notificationFilter, object); notificationRegistration(true); }
@Override public void addNotificationListener(final NotificationListener listener, final NotificationFilter filter, final Object handback) throws IllegalArgumentException { clearIO(); try { broadcaster.addNotificationListener(listener, filter, handback); } finally { blockOnIO(); } }
public void addNotificationListener(NotificationListener listener) { removeNotificationListener(listener); getBean(); // this smells: force the local notification listener to be added to bean. broadcaster.addNotificationListener(listener, null, null); }