Package javax.management

Examples of javax.management.NotificationFilter


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

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

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

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


         {
            final Notification notification = targetedNotification.getNotification();
            boolean deliverNotification = true;
            if(holder.getFilterOnClient())
            {
               NotificationFilter filter = holder.getFilter();
               if(!filter.isNotificationEnabled(notification))
               {
                  deliverNotification = false;
               }
            }
            if(deliverNotification)
View Full Code Here

    receivedNotifications.clear();
   
    // until sun-bug #6200031 gets resolved
    // filter out OBSERVED_ATTRIBUTE_TYPE_ERROR
    NotificationFilter filter = new NotificationFilter() {
       public boolean isNotificationEnabled(Notification notification)
       {
          return !MonitorNotification.OBSERVED_ATTRIBUTE_TYPE_ERROR.equals(notification.getType());
       }
    };
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 != null) &&
         (filter.isNotificationEnabled(notification)))) {
       
                    listener.handleNotification(notification,handback) ;
                }
            }
        }
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

                } 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

          }
          return used;
        }
      };

      NotificationFilter filter = new NotificationFilter() {
        private static final long serialVersionUID = 2971450191223596323L;

        @Override
        public boolean isNotificationEnabled(Notification notification) {
          return true;
View Full Code Here

   */
  private void registerNotificationListeners() throws MBeanExportException {
    for (int i = 0; i < this.notificationListeners.length; i++) {
      NotificationListenerBean bean = this.notificationListeners[i];
      NotificationListener listener = bean.getNotificationListener();
      NotificationFilter filter = bean.getNotificationFilter();
      Object handback = bean.getHandback();
      ObjectName[] namesToRegisterWith = getObjectNamesForNotificationListener(bean);
      for (int j = 0; j < namesToRegisterWith.length; j++) {
        ObjectName objectName = namesToRegisterWith[j];
        try {
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.