Examples of addNotificationListener()


Examples of javax.management.MBeanServer.addNotificationListener()

            beanName = ObjectName.getInstance(name);
            boolean notifications = server.isInstanceOf(beanName, NotificationBroadcaster.class.getName());

            if (notifications && file != null && file.exists()) {
                listener = new FileNotificationListener(file);
                server.addNotificationListener(beanName, listener, null, null);
            }
            result = server.invoke(beanName, operationName, parameterList.toArray(), signatureList.toArray(new String[0]));
        } catch (Exception e) {
            throw new OperationFailedException(e.getMessage(), e, new ModelNode().set(e.getMessage()));
        } finally {
View Full Code Here

Examples of javax.management.MBeanServer.addNotificationListener()

      else
      {
         // Register for notification of the overall server startup
         log.debug("Server '" + ServerImplMBean.OBJECT_NAME + "' not started, registering for start-up notification");

         server.addNotificationListener(ServerImplMBean.OBJECT_NAME, this, null, null);
      }

   }

   /**
 
View Full Code Here

Examples of javax.management.MBeanServer.addNotificationListener()

        ObjectName delegate=new ObjectName("JMImplementation:type=MBeanServerDelegate");

        // XXX need to extract info about previously loaded beans

        // we'll know of all registered beans
        mserver.addNotificationListener(delegate, this, null, null );

    }

}
View Full Code Here

Examples of javax.management.MBeanServer.addNotificationListener()

         try
         {
            support = new RelationSupport("id1", service, server,
                                          "relationTypeC", rolesC);
            addRelation(server, service, support, "test:type=support1");
            server.addNotificationListener(service, listener, null, null);
            support.setRole(roleCX2);
            on = new ObjectName("test:type=support1");
         }
         catch(Exception e)
         {
View Full Code Here

Examples of javax.management.MBeanServer.addNotificationListener()

         try
         {
            support = new RelationSupport("id1", service, server,
                                          "relationTypeC", rolesC);
            addRelation(server, service, support, "test:type=support1");
            server.addNotificationListener(service, listener, null, null);
           
            support.setRoles(shouldBe);
            on = new ObjectName("test:type=support1");
         }
         catch(Exception e)
View Full Code Here

Examples of javax.management.MBeanServer.addNotificationListener()

         RelationSupport support = null;
         ObjectName rsupp = null;
         String result = null;
         Listener listener = new Listener(RelationNotification.RELATION_MBEAN_CREATION);
         RelationService rs = (RelationService) services.get(service);
         server.addNotificationListener(service, listener, null, null);
         support = new RelationSupport("id", service, server, "relationTypeB",
                                       rolesB);
         rsupp = new ObjectName("test:add=relation");
         server.registerMBean(support, rsupp);
         rs.addRelation(rsupp);
View Full Code Here

Examples of javax.management.MBeanServer.addNotificationListener()

         createRelationTypeB(service);
         createRolesB(server);
         RelationSupport support = null;
         Listener listener = new Listener(RelationNotification.RELATION_BASIC_CREATION);
         RelationService rs = (RelationService) services.get(service);
         server.addNotificationListener(service, listener, null, null);
         rs.createRelation("id", "relationTypeB", rolesB);
         boolean result = rs.hasRelation("id").booleanValue();
         assertEquals(true, result);
         listener.check(1);
      }
View Full Code Here

Examples of javax.management.MBeanServer.addNotificationListener()

         Listener listener = new Listener(RelationNotification.RELATION_MBEAN_REMOVAL);
         boolean result = false;
         support = new RelationSupport("id1", service, server,
                                       "relationTypeC", rolesC);
         addRelation(server, service, support, "test:type=support1");
         server.addNotificationListener(service, listener, null, null);
         RelationService rs = (RelationService) services.get(service);
         server.unregisterMBean(new ObjectName("x:relation=c,role=2,bean=1"));
         on = new ObjectName("test:type=support1");
         result = rs.hasRelation("id1").booleanValue();
         assertEquals(false, result);
View Full Code Here

Examples of javax.management.MBeanServer.addNotificationListener()

         boolean result = false;
         RelationService rs = null;
         support = new RelationSupport("id1", service, server,
                                       "relationTypeC", rolesC);
         addRelation(server, service, support, "test:type=support1");
         server.addNotificationListener(service, listener, null, null);
         rs = (RelationService) services.get(service);
         rs.setPurgeFlag(false);
         server.unregisterMBean(new ObjectName("x:relation=c,role=2,bean=1"));
         on = new ObjectName("test:type=support1");
         result = rs.hasRelation("id1").booleanValue();
View Full Code Here

Examples of javax.management.MBeanServer.addNotificationListener()

         ObjectName on = null;
         Listener listener = new Listener(RelationNotification.RELATION_MBEAN_CREATION);
         support = new RelationSupport("id1", service, server,
                                       "relationTypeC", rolesC);
         addRelation(server, service, support, "test:type=support1");
         server.addNotificationListener(service, listener, null, null);
         RelationService rs = (RelationService) services.get(service);
         rs.sendRelationCreationNotification("id1");
         on = new ObjectName("test:type=support1");
         RelationNotification rn = listener.check(1);
         assertEquals(new ArrayList(), rn.getMBeansToUnregister());
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.