Package javax.management

Examples of javax.management.NotificationFilter


               if( addNotificationListeners.contains(method) )
               {
                  ObjectName name = (ObjectName) args[0];
                  RMINotificationListener listener = (RMINotificationListener)
                     args[1];
                  NotificationFilter filter = (NotificationFilter) args[2];
                  Object handback = args[3];
                  addNotificationListener(name, listener, filter, handback);
               }
               else if( removeNotificationListeners.contains(method) )
               {
View Full Code Here


                try
                {
                    Class< ? > clazz = Class.forName( jmxMdb.toString() );
                    NotificationListener listener = ( NotificationListener ) clazz.newInstance();

                    NotificationFilter filter = null;
                   
                    Object handback = null;
                   
                    for ( Iterator iterator = destinations.iterator(); iterator.hasNext(); )
                    {
View Full Code Here

            // Loop on handback
            //
            Enumeration f = filterList.elements();
      for (Enumeration h = handbackList.elements(); h.hasMoreElements(); ) {
                Object handback = h.nextElement();
                NotificationFilter filter = (NotificationFilter) f.nextElement();
                if ((filter == null) || ((filter != null) && (filter.isNotificationEnabled(notification)))) {
                    listener.handleNotification(notification,handback);
                }
            }
        }
    }
View Full Code Here

        }
        manageTimer();
    }

    public synchronized void addPerfNotificationListener(NotificationListener listener, Object handback) {
        timer.addNotificationListener(listener, new NotificationFilter() {
            @Override
            public boolean isNotificationEnabled(Notification notification) {
                return "perfTimer".equals(notification.getType());
            }
        }, handback);
View Full Code Here

            }
        }
    }

    public synchronized void addStructuralNotificationListener(NotificationListener listener, Object handback) {
        timer.addNotificationListener(listener, new NotificationFilter() {
            @Override
            public boolean isNotificationEnabled(Notification notification) {
                return "structTimer".equals(notification.getType());
            }
        }, handback);
View Full Code Here

                    if (stop)
                        timer.stop();
                }
            }
        }, new NotificationFilter() {
            @Override
            public boolean isNotificationEnabled(Notification notification) {
                return "isLastThreadTest".equals(notification.getType());
            }
        }, null);
View Full Code Here

       "applying filters to candidate");
            synchronized (listeners) {
                for (Iterator it = listeners.iterator(); it.hasNext(); ) {
                    ListenerInfo li = (ListenerInfo) it.next();
                    ObjectName pattern = li.getObjectName();
                    NotificationFilter filter = li.getNotificationFilter();

                    if (logger.debugOn()) {
                        logger.debug("fetchNotifications",
                              "pattern=<" + pattern + ">; filter=" + filter);
                    }

                    if (pattern.apply(name)) {
                        logger.debug("fetchNotifications", "pattern matches");
                        if (filter == null
                            || filter.isNotificationEnabled(notif)) {
                            logger.debug("fetchNotifications",
           "filter matches");
                            Integer listenerID = li.getListenerID();
                            TargetedNotification tn =
                                new TargetedNotification(notif, listenerID);
View Full Code Here

   private class RemoveNotificationListenerTripletAction implements Action
   {
      public Object perform(Object[] args) throws Throwable
      {
         NotificationListener listener = (NotificationListener) args[0];
         NotificationFilter filter = (NotificationFilter) args[1];
         Object handback = args[2];
         mbeanServerConnection.removeNotificationListener(objectName, listener, filter, handback);
         return null;
      }
View Full Code Here

   private class AddNotificationListenerAction implements Action
   {
      public Object perform(Object[] args) throws Throwable
      {
         NotificationListener listener = (NotificationListener) args[0];
         NotificationFilter filter = (NotificationFilter) args[1];
         Object handback = args[2];
         mbeanServerConnection.addNotificationListener(objectName, listener, filter, handback);
         return null;
      }
View Full Code Here

        if (debug) logger.debug("addNotificationListener"+
          "(ObjectName,NotificationFilter)",
          "connectionId=" + clientId +
            " unwrapping filter with target extended ClassLoader.");

        NotificationFilter filterValue = (NotificationFilter)unwrapWithDefault(
                    wrappedFilters[i],
                    targetCl);

        if (debug) logger.debug("addNotificationListener"+
          "(ObjectName,NotificationFilter)",
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.