Package javax.management

Examples of javax.management.MBeanServerConnection.removeNotificationListener()


      sleep(1000);
      Notification notification = (Notification)listener.get();
      assertNotNull(notification);
      listener.reset();

      cntion.removeNotificationListener(delegateName, listener);

      cntion.unregisterMBean(name);
      sleep(1000);

      notification = (Notification)listener.get();
View Full Code Here


         };

         // Add the listener and be sure the mechanism of removal works fine
         mbsc.addNotificationListener(emitterName, listener, null, null);
         assertEquals(emitter.getSize(), 1);
         mbsc.removeNotificationListener(emitterName, listener, null, null);
         assertEquals(emitter.getSize(), 0);

         // Add the listener and close the connector
         mbsc.addNotificationListener(emitterName, listener, null, null);
         assertEquals(emitter.getSize(), 1);
View Full Code Here

          return null;
        }
        final Set<ObjectName> queryNames = connection.queryNames(bundleStateQueryObjectName, null);
        for (ObjectName bundleStateObjectName : queryNames) {
          try {
            connection.removeNotificationListener(bundleStateObjectName, listener, filter, handback);
          } catch (Exception ex) {
            KarafJMXPlugin.getLogger().warning(ex);
          }
          return null;
        }
View Full Code Here

            //
            Thread.sleep(2000);

            // Remove notification listener
            //
            mbsc.removeNotificationListener(nb1, li);
            mbsc.removeNotificationListener(nb2, li);

            int result = 0;
            List<ObjectName> sources = new ArrayList();
            sources.add(nb1);
View Full Code Here

            Thread.sleep(2000);

            // Remove notification listener
            //
            mbsc.removeNotificationListener(nb1, li);
            mbsc.removeNotificationListener(nb2, li);

            int result = 0;
            List<ObjectName> sources = new ArrayList();
            sources.add(nb1);
            sources.add(nb2);
View Full Code Here

        }

        System.out.println("EmptyDomainNotificationTest-main: Got the expected notif!");

        System.out.println("EmptyDomainNotificationTest-main: remove the listener.");
        mbsc.removeNotificationListener(mbean, li);

        // clean
        client.close();
        server.stop();
View Full Code Here

                }

                for (i=0;i<countListeners.length;i++) {
                    System.out.println("Removing notification listener: " +
                                       countListeners[i]);
                    conn.removeNotificationListener(delegateName,
                                                    countListeners[i]);
                }

                System.out.println("Waiting for id list to drop ours");
                deadline = System.currentTimeMillis() + timeout*2 + 10000;
View Full Code Here

            Thread.sleep(2000);

            // Remove notification listener
            //
            if (!throwException)
                mbsc.removeNotificationListener(nb1, li);
            try {
                mbsc.removeNotificationListener(nb2, li);
                if (enableChecks && throwException) {
                    echo("Didn't get expected exception");
                    return 1;
View Full Code Here

            // Remove notification listener
            //
            if (!throwException)
                mbsc.removeNotificationListener(nb1, li);
            try {
                mbsc.removeNotificationListener(nb2, li);
                if (enableChecks && throwException) {
                    echo("Didn't get expected exception");
                    return 1;
                }
            } catch (SecurityException e) {
View Full Code Here

                                         null);

            // 1 Listener is expected to be added by the ServerNotifForwader
            checkNotifier(s, 1, "addNotificationListener");

            mbsc.removeNotificationListener(notifierName,
                                            dummyListener);
            System.out.println("Test OK for " + protocol);
        }catch(MalformedURLException e) {
            System.out.println("Skipping URL " + u);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.