Examples of addNotificationListener()


Examples of javax.management.MBeanServerConnection.addNotificationListener()

         MBeanServerInvocationHandler.newProxyInstance(server0, drmService,
         IReplicants.class, true);
      log.debug("+++ testStateReplication 2");
      log.info(MBeanServerInvocationHandler.class.getProtectionDomain());
      TestListener listener = new TestListener(log);
      server0.addNotificationListener(drmService, listener, null, null);
      log.info("server0 addNotificationListener");
      log.debug("+++ testStateReplication 3");
      String address = (String) drm0.lookupLocalReplicant();
      log.debug("+++ testStateReplication 4");
      log.info("server0: lookupLocalReplicant: "+address);
View Full Code Here

Examples of javax.management.MBeanServerConnection.addNotificationListener()

      Vector<?> view1 = (Vector<?>) server1.getAttribute(clusterService, "CurrentView");
      log.info("server1: CurrentView, "+view1);
      IReplicants drm1 = (IReplicants)
         MBeanServerInvocationHandler.newProxyInstance(server1, drmService,
         IReplicants.class, true);
      server1.addNotificationListener(drmService, listener, null, null);
      log.info("server1 addNotificationListener");
      address = (String) drm1.lookupLocalReplicant();
      log.info("server1: lookupLocalReplicant: "+address);
      assertTrue("server1: address("+address+") == server1("+servers[1]+")",
         address.equals(servers[1]));
View Full Code Here

Examples of javax.management.MBeanServerConnection.addNotificationListener()

      createMO(jmxFactory);
     
      scalarSupport.addAll(CONNECTOR_MANAGER, CONNECTOR_MANAGER_ATTR);
      scalarSupport.addAll(SERVER, SERVER_ATTR);
         
      server.addNotificationListener(JMX_EVENT_LOGGER, this, null, JMX_EVENT_LOGGER);
         
    }
    catch (Exception e)
    {
      Log.warn(e);
View Full Code Here

Examples of javax.management.MBeanServerConnection.addNotificationListener()

                              new MBeanNotificationInfo(jvmLowMemoryPoolUsageNotif,
          new JMXAttributeNotificationIndexSupport(
          new TypedAttribute("poolName", String.class),
          jvmMemManagerIndexSupport)));
      try {
        server.addNotificationListener(onameJvmMem,
                                       notificationSupport, null,
                                       JvmManagementMib.
                                       oidJvmLowMemoryPoolUsageNotif);
      }
      catch (Exception ex) {
View Full Code Here

Examples of javax.management.MBeanServerConnection.addNotificationListener()

                              new MBeanNotificationInfo(jvmLowMemoryPoolCollectNotif,
          new JMXAttributeNotificationIndexSupport(
          new TypedAttribute("poolName", String.class),
          jvmMemManagerIndexSupport)));
      try {
        server.addNotificationListener(onameJvmMem,
                                       notificationSupport, null,
                                       JvmManagementMib.
                                       oidJvmLowMemoryPoolCollectNotif);
      }
      catch (Exception ex) {
View Full Code Here

Examples of javax.management.MBeanServerConnection.addNotificationListener()

    if (e.getPropertyName().equals(Plugin.NEW_NODE_CONNECTION)){
      try {
        MBeanServerConnection mbsc=(MBeanServerConnection)e.getNewValue();
  if ( !ht_connectedGateway.containsValue(mbsc) ) {
    String jmxsurl = (String) e.getOldValue();
    mbsc.addNotificationListener(Activator.REMOTE_LOGGER_ON, this, null, jmxsurl);
    // At gateway connection time : add into the tree a "port/profileName" node under an "ip" node
    String ref = jmxsurl.substring(jmxsurl.lastIndexOf(":")+1);
    String ip_tmp = jmxsurl.substring(0, jmxsurl.lastIndexOf(":"));
    String ip = ip_tmp.substring(ip_tmp.lastIndexOf("/")+1);
    String connString = jmxsurl.substring(ip_tmp.lastIndexOf("/")+1);
View Full Code Here

Examples of javax.management.MBeanServerConnection.addNotificationListener()

            JMX.newMBeanProxy(mbsc, mbeanName, HelloMBean.class, true);

        // Add notification listener on Hello MBean
        //
        echo("\nAdd notification listener...");
  mbsc.addNotificationListener(mbeanName, listener, null, null);

        // Get CacheSize attribute in Hello MBean
        //
        echo("\nCacheSize = " + mbeanProxy.getCacheSize());
View Full Code Here

Examples of javax.management.NotificationBroadcaster.addNotificationListener()

                    // XXX add filter support
                    if( mbean instanceof NotificationBroadcaster ) {
                        // register for attribute changes
                        NotificationBroadcaster nb=(NotificationBroadcaster)mbean;
                        nb.addNotificationListener(this, null, null);
                        if( log.isDebugEnabled() )
                            log.debug( "Add attribute change listener");
                    }

                    instances.put( oname.toString(), mbean );
View Full Code Here

Examples of javax.management.NotificationBroadcaster.addNotificationListener()

                    // XXX add filter support
                    if( mbean instanceof NotificationBroadcaster ) {
                        // register for attribute changes
                        NotificationBroadcaster nb=(NotificationBroadcaster)mbean;
                        nb.addNotificationListener(this, null, null);
                        if( log.isDebugEnabled() )
                            log.debug( "Add attribute change listener");
                    }

                    instances.put( oname.toString(), mbean );
View Full Code Here

Examples of javax.management.NotificationBroadcasterSupport.addNotificationListener()

      NotificationBroadcasterSupport broadcaster = new NotificationBroadcasterSupport();

      Listener listener = new Listener();
      NotificationFilterSupport filter = new NotificationFilterSupport();
      filter.disableType(DEFAULT_TYPE);
      broadcaster.addNotificationListener(listener, filter, null);

      clear();
      createNotification(broadcaster);

      compare(apply(sent, filter), received(listener, null));
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.