Examples of addNotificationListener()


Examples of mx4j.remote.AbstractRemoteNotificationClientHandler.addNotificationListener()

            {
            }
         };

         ObjectName name = ObjectName.getInstance(":name=emitter");
         handler.addNotificationListener(new Integer(1), new NotificationTuple(name, listener, null, null));
         handler.addNotificationListener(new Integer(2), new NotificationTuple(name, listener, null, new Object()));

         assertTrue(handler.isActive());

         Integer[] ids = handler.getNotificationListeners(new NotificationTuple(name, listener));
View Full Code Here

Examples of mx4j.remote.RemoteNotificationClientHandler.addNotificationListener()

      try
      {
         handler.start();

         ObjectName name = ObjectName.getInstance(":name=emitter");
         handler.addNotificationListener(new Integer(1), new NotificationTuple(name, listener, null, null));
         Object handback = new Object();
         handler.addNotificationListener(new Integer(2), new NotificationTuple(name, listener, null, handback));
         handler.removeNotificationListeners(new Integer[]{new Integer(2)});

         assertFalse(handler.contains(new NotificationTuple(name, listener, null, handback)));
View Full Code Here

Examples of mx4j.server.interceptor.NotificationListenerMBeanServerInterceptor.addNotificationListener()

         public void handleNotification(Notification notification, Object handback)
         {
         }
      };

      interceptor.addNotificationListener(metadata, listener, null, null);
      assertEquals(1, interceptor.getNotificationListenerWrappers().size());
      Object wrapper = ((Map.Entry)interceptor.getNotificationListenerWrappers().entrySet().iterator().next()).getValue();
      assertEquals(1, interceptor.getNotificationListenerWrapperReferenceCount(wrapper));
      assertEquals(1, interceptor.getObjectNames().size());
      assertEquals(objectName, interceptor.getObjectNames().keySet().iterator().next());
View Full Code Here

Examples of org.hornetq.core.server.management.ManagementService.addNotificationListener()

      ManagementService service = server.getManagementService();
      if (service != null)
      {
         //allow management message to pass
         destinations.add(service.getManagementAddress().toString());
         service.addNotificationListener(this);
      }
   }

   // ProtocolManager implementation --------------------------------
View Full Code Here

Examples of org.hornetq.core.server.management.ManagementService.addNotificationListener()

      ManagementService service = server.getManagementService();
      if (service != null)
      {
         //allow management message to pass
         destinations.add(service.getManagementAddress().toString());
         service.addNotificationListener(this);
      }
   }

   // ProtocolManager implementation --------------------------------
View Full Code Here

Examples of org.hornetq.tests.integration.SimpleNotificationService.addNotificationListener()

   public void testDiscoveryGroupNotifications() throws Exception
   {
      SimpleNotificationService notifService = new SimpleNotificationService();
      SimpleNotificationService.Listener notifListener = new SimpleNotificationService.Listener();
      notifService.addNotificationListener(notifListener);

      final InetAddress groupAddress = InetAddress.getByName(DiscoveryTest.address1);
      final int groupPort = getUDPDiscoveryPort();
      final int timeout = 500;
View Full Code Here

Examples of org.hornetq.tests.integration.SimpleNotificationService.addNotificationListener()

   public void testBroadcastGroupNotifications() throws Exception
   {
      SimpleNotificationService notifService = new SimpleNotificationService();
      SimpleNotificationService.Listener notifListener = new SimpleNotificationService.Listener();
      notifService.addNotificationListener(notifListener);

      final InetAddress groupAddress = InetAddress.getByName(DiscoveryTest.address1);
      final int groupPort = getUDPDiscoveryPort();

      BroadcastGroup bg = new BroadcastGroupImpl(RandomUtil.randomString(),
View Full Code Here

Examples of org.jboss.cache.jmx.CacheJmxWrapper.addNotificationListener()

      // the CacheJmxWrapper
      synchronized (pendingListeners)
      {
         for (NotificationListenerArgs args : pendingListeners)
         {
            plainCache.addNotificationListener(args.listener, args.filter, args.handback);
         }
      }
      return plainCache;
   }
View Full Code Here

Examples of org.jboss.jmx.adaptor.rmi.RMIAdaptor.addNotificationListener()

   {
      log.info("+++ testNotification");
      RMIListener listener = new RMIListener(10);
      listener.export();
      RMIAdaptor server = (RMIAdaptor) getInitialContext().lookup("jmx/invoker/RMIAdaptor");
      server.addNotificationListener(getObjectName(), listener, null, "runTimer");
      server.invoke(getObjectName(), "startTimer", null, null);
      synchronized( listener )
      {
         listener.wait(15000);
      }
View Full Code Here

Examples of org.jboss.jmx.adaptor.rmi.RMIAdaptorExt.addNotificationListener()

      ObjectName dsService = new ObjectName("jboss.test:service=DistributedStateTestCase");
      IDistributedState ds0 = (IDistributedState)
         MBeanServerInvocationHandler.newProxyInstance(server0, dsService,
         IDistributedState.class, true);
      TestListener listener0 = new TestListener();
      server0.addNotificationListener(dsService, listener0, null, null);
      ds0.put("key0", "value0");
      String value = (String) ds0.get("key0");
      log.info("server0: get(key0): "+value);
      assertTrue("server0: value == value0", value.equals("value0"));
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.