Package javax.management

Examples of javax.management.NotificationFilter


        }
        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());
            }
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());
            }
View Full Code Here

      {
         SubscriptionInfo mbeanInfo = (SubscriptionInfo)i.next();
        
         ObjectName objectName = mbeanInfo.getObjectName();
         Object handback = mbeanInfo.getHandback();
         NotificationFilter filter = mbeanInfo.getFilter();
        
         if (objectName.isPattern())
         {
            Set mset = server.queryNames(objectName, null);
           
View Full Code Here

      {
         SubscriptionInfo mbeanInfo = (SubscriptionInfo)i.next();
        
         ObjectName objectName = mbeanInfo.getObjectName();
         Object handback = mbeanInfo.getHandback();
         NotificationFilter filter = mbeanInfo.getFilter();
        
         if (objectName.isPattern())
         {
            Set mset = server.queryNames(objectName, null);
           
View Full Code Here

               // try to convert name to the correct data type
               // may throw MalformedObjectNameException
               ObjectName objectName = new ObjectName(name);
              
               // Parse level 2 - see if we have a filter for this subscription
               NotificationFilter filter = null;
              
               NodeList mbeanChildren = mbean.getChildNodes();

               // check for filter spec, as a single mbean child node              
               for (int j = 0; j < mbeanChildren.getLength(); j++)
View Full Code Here

            try {
                final JMXServiceURL url = new JMXServiceURL(urls[i]);
                final JMXConnector c =
                    JMXConnectorFactory.newJMXConnector(url,(Map)null);
                final NotificationListener nl = null;
                final NotificationFilter   nf = null;
                final Object               h  = null;
                System.out.println("Testing " + c.getClass().getName());
                try {
                    System.out.println(
                        "addConnectionNotificationListener(null,null,null)");
View Full Code Here

            return false;
        }
        System.out.println("Timeout worked, OK");

        // Check that notification filtering works
        NotificationFilter senderFilter = new NotificationFilter() {
            public boolean isNotificationEnabled(Notification n) {
                if (!(n instanceof MBeanServerNotification))
                    return false;
                MBeanServerNotification mbsn = (MBeanServerNotification) n;
                return (mbsn.getMBeanName().equals(senderName));
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

            LOG.info("Registering MBean {}", name);
            MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
            ObjectName mxbeanName = new ObjectName(name);
            mbs.registerMBean(this, mxbeanName);

            timer.addNotificationListener(this, new NotificationFilter() {
                @Override
                public boolean isNotificationEnabled(Notification notification) {
                    return "tickTimer".equals(notification.getType());
                }
            }, 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.