Package javax.management

Examples of javax.management.NotificationFilter


            occurrencesCount.set(occurrencesCount.get() + 1);
         }
      };

      m_server.addNotificationListener(m_timerName, listener, new NotificationFilter()
      {
         public boolean isNotificationEnabled(Notification notification)
         {
            return notification.getType().equals(notifType);
         }
View Full Code Here


         {
            periodicOccurrences.set(periodicOccurrences.get() + 1);
         }
      };

      m_server.addNotificationListener(m_timerName, listener, new NotificationFilter()
      {
         public boolean isNotificationEnabled(Notification notification)
         {
            return notification.getType().equals(notifType);
         }
      }, null);
      m_server.addNotificationListener(m_timerName, periodicListener, new NotificationFilter()
      {
         public boolean isNotificationEnabled(Notification notification)
         {
            return notification.getType().equals(periodicNotifType);
         }
View Full Code Here

               fdOccurrences.set(fdOccurrences.get() + 1);
            }
         }
      };

      m_server.addNotificationListener(m_timerName, fdListener, new NotificationFilter()
      {
         public boolean isNotificationEnabled(Notification notification)
         {
            return notification.getType().equals(fdNotifType);
         }
      }, null);

      m_server.addNotificationListener(m_timerName, frListener, new NotificationFilter()
      {
         public boolean isNotificationEnabled(Notification notification)
         {
            return notification.getType().equals(frNotifType);
         }
View Full Code Here

        throws InstanceNotFoundException, IOException {

        checkNonNull("Target MBean name", name);
        checkNonNull("Listener MBean name", listener);

        final NotificationFilter filterValue;
        final Object handbackValue;
        final boolean debug=logger.debugOn();

        final ClassLoader targetCl = getClassLoaderFor(name);
View Full Code Here

        IOException {

        checkNonNull("Target MBean name", name);
        checkNonNull("Listener MBean name", listener);

        final NotificationFilter filterValue;
        final Object handbackValue;
        final boolean debug=logger.debugOn();

        final ClassLoader targetCl = getClassLoaderFor(name);
View Full Code Here

            java.util.Enumeration f = filterList.elements();
            for(java.util.Enumeration h = handbackList.elements();
                h.hasMoreElements(); ) {

                Object handback = h.nextElement();
                NotificationFilter filter =
                    (NotificationFilter)f.nextElement();

                if ((filter == null) ||
                     (filter.isNotificationEnabled(notification))) {

                    listener.handleNotification(notification,handback) ;
                }
            }
        }
View Full Code Here

                } catch (Exception x) {
                    System.err.println("Failed to queue notif: "+x);
                }
            }
        };
        NotificationFilter filter = null;
        Object handback = null;
        final ScanState before;
        final NotificationEmitter emitter = (NotificationEmitter)
                makeNotificationEmitter(proxy,DirectoryScannerMXBean.class);
        emitter.addNotificationListener(listener, filter, handback);
View Full Code Here

                } catch (Exception x) {
                    System.err.println("Failed to queue notif: "+x);
                }
            }
        };
        NotificationFilter filter = null;
        Object handback = null;
        final ScanState before;
        final NotificationEmitter emitter = (NotificationEmitter)proxy;
        emitter.addNotificationListener(listener, filter, handback);
        before = proxy.getState();
View Full Code Here

        // register the NotificationListener
        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=eventnotifiers,name=JmxEventNotifier");
        MyNotificationListener listener = new MyNotificationListener();  
        context.getManagementStrategy().getManagementAgent().getMBeanServer().addNotificationListener(on,
            listener,                                                                                        
            new NotificationFilter() {
                public boolean isNotificationEnabled(Notification notification) {
                    return notification.getSource().equals("MyCamel");
                }
            }, null);
View Full Code Here

    public void testExchangeFailed() throws Exception {
        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=eventnotifiers,name=JmxEventNotifier");
       
        MyNotificationListener listener = new MyNotificationListener();  
        context.getManagementStrategy().getManagementAgent().getMBeanServer().addNotificationListener(on,
            listener, new NotificationFilter() {
                public boolean isNotificationEnabled(Notification notification) {
                    return true;
                }
            }, null);
       
View Full Code Here

TOP

Related Classes of javax.management.NotificationFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.