Package org.jboss.test.jmx.compliance.server.support

Examples of org.jboss.test.jmx.compliance.server.support.Test


            new ObjectName("JMImplementation:type=MBeanServerDelegate"),
            listener, null, "handback2"
      );      
   
      // force notification
      server.registerMBean(new Test(), new ObjectName(":foo=bar"));

      assertTrue(listener.result1);
      assertTrue(listener.result2);
   }
View Full Code Here


            new ObjectName("JMImplementation:type=MBeanServerDelegate"),
            listener2
      );      
   
      // force notification
      server.registerMBean(new Test(), new ObjectName(":foo=bar"));

      assertTrue(listener1.result == 2);
      assertTrue(listener2.result1 == false);
      assertTrue(listener2.result2 == false);
   }
View Full Code Here

            new ObjectName("JMImplementation:type=MBeanServerDelegate"),
            listener2, null, "handback3"
      );      
   
      // force notification
      server.registerMBean(new Test(), new ObjectName(":foo=bar"));

      assertTrue(listener1.result == 2);
      assertTrue(listener1.result == 2);
   }
View Full Code Here

      // Test we get a notification from the broadcaster
      broadcaster.doSomething();
      assertEquals(1, listener.result);

      // Test we get a notification from the delegate
      server.registerMBean(new Test(), new ObjectName("Test:foo=bar"));
      assertEquals(2, listener.result);

      // Remove the broadcaster
      server.unregisterMBean(broadcasterName);
      assertEquals(3, listener.result);
View Full Code Here

      // Test we get a notification from the broadcaster
      broadcaster.doSomething();
      assertEquals(0, listener.result);

      // Test we get a notification from the delegate
      server.registerMBean(new Test(), new ObjectName("Test:foo=bar"));
      assertEquals(1, listener.result);
   }
View Full Code Here

      ObjectName delegateName =
         new ObjectName("JMImplementation:type=MBeanServerDelegate");
      server.addNotificationListener(delegateName, listenerName, filter, "MyHandback");
   
      // force notification
      server.registerMBean(new Test(), new ObjectName(":foo=bar"));
   
      assertTrue(listener.count == 1);
      assertTrue(listener.source.equals(delegateName));
      assertTrue(listener.handback.equals("MyHandback"));
   }
View Full Code Here

         new ObjectName("JMImplementation:type=MBeanServerDelegate");
      server.addNotificationListener(delegateName, listenerName1, null, "handback1");
      server.addNotificationListener(delegateName, listenerName2, null, "handback2");
   
      // force notification
      server.registerMBean(new Test(), new ObjectName(":foo=bar"));

      assertEquals(1, listener1.count);
      assertEquals(listener1.source,delegateName);
      assertEquals(listener1.handback,"handback1");
      assertEquals(1, listener2.count);
View Full Code Here

         new ObjectName("JMImplementation:type=MBeanServerDelegate");
      server.addNotificationListener(delegateName, listenerName, null, "handback1");
      server.addNotificationListener(delegateName, listenerName, null, "handback2");
   
      // force notification
      server.registerMBean(new Test(), new ObjectName(":foo=bar"));

      assertTrue(listener.count1 == 1);
      assertEquals(listener.source1,delegateName);
      assertEquals(listener.handback1,"handback1");
      assertTrue(listener.count2 == 1);
View Full Code Here

      server.addNotificationListener(delegateName, listenerName2, null, "handback2");
      server.addNotificationListener(delegateName, listenerName2, null, "handback3");
      server.removeNotificationListener(delegateName, listenerName2);
   
      // force notification
      server.registerMBean(new Test(), new ObjectName(":foo=bar"));
      assertTrue("Listener1 should get a notification", listener1.count == 1);
      assertTrue("Source should be the delegate", listener1.source.equals(delegateName));
      assertTrue("Listener1 should get handback1", listener1.handback.equals("handback1"));
      assertTrue("Listener2 should have no notiifcation", listener2.count == 0);
      assertTrue("Listener2 should have no notiifcation for handback2", listener2.count1 == 0);
View Full Code Here

      server.addNotificationListener(delegateName, listenerName2, null, "handback2");
      server.addNotificationListener(delegateName, listenerName2, null, "handback3");
      server.removeNotificationListener(delegateName, listenerName2, null, "handback3");
   
      // force notification
      server.registerMBean(new Test(), new ObjectName(":foo=bar"));
      assertTrue("Listener1 should get a notification", listener1.count == 1);
      assertTrue("Source should be the delegate", listener1.source.equals(delegateName));
      assertTrue("Listener1 should get handback1", listener1.handback.equals("handback1"));
      assertTrue("Listener2 should get a notification", listener2.count1 == 1);
      assertTrue("Source should be the delegate", listener2.source1.equals(delegateName));
View Full Code Here

TOP

Related Classes of org.jboss.test.jmx.compliance.server.support.Test

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.