Examples of registerListener()


Examples of org.jboss.kernel.spi.event.KernelEventManager.registerListener()

      KernelRegistryEntry entry = makeEntry(emitter);
      registry.registerEntry("Emitter", entry);
      TestListener listener = new TestListener();
      TestFilter filter = new TestFilter();
      Object handback = new Object();
      eventManager.registerListener("Emitter", listener, filter, handback);
      emitter.testFire("testtype", null);
      ArrayList expected = new ArrayList();
      expected.add(EventTestCaseSupport.makeExpected(emitter, "testtype", 0, null, handback));
      EventTestCaseSupport.check(listener, expected);
      EventTestCaseSupport.check(filter, expected);
View Full Code Here

Examples of org.jboss.kernel.spi.event.KernelEventManager.registerListener()

      Kernel kernel = bootstrap();
      KernelEventManager eventManager = kernel.getEventManager();
      TestListener listener = new TestListener();
      try
      {
         eventManager.registerListener("doesnotexist", listener, null, null);
         fail("Should not be here");
      }
      catch (KernelRegistryEntryNotFoundException expected)
      {
      }
View Full Code Here

Examples of org.jboss.kernel.spi.event.KernelEventManager.registerListener()

      KernelRegistryEntry entry = makeEntry(notAnEmitter);
      registry.registerEntry("notanemitter", entry);
      TestListener listener = new TestListener();
      try
      {
         eventManager.registerListener("notanemitter", listener, null, null);
         fail("Should not be here");
      }
      catch (ClassCastException expected)
      {
      }
View Full Code Here

Examples of org.jboss.messaging.core.plugin.contract.Replicator.registerListener()

         if (!postOffice.isLocal())
         {
            Replicator rep = (Replicator)postOffice;
            connFactoryJNDIMapper.injectReplicator(rep);           
            rep.registerListener(new FailoverListener());
         }
        
         // Also need to inject into txRepository
         txRepository.injectPostOffice(postOffice);
      }
View Full Code Here

Examples of org.jboss.test.kernel.event.support.TestEmitter.registerListener()

   public void testSimpleFireEvent() throws Throwable
   {
      TestEmitter emitter = new TestEmitter();
      TestListener listener = new TestListener();
      emitter.registerListener(listener, null, null);
      emitter.testFire("testtype", null);
      ArrayList expected = new ArrayList();
      expected.add(EventTestCaseSupport.makeExpected(emitter, "testtype", 0, null, null));
      EventTestCaseSupport.check(listener, expected);
   }
View Full Code Here

Examples of org.jboss.test.kernel.event.support.TestEmitter.registerListener()

   public void testDoubleFireEvent() throws Throwable
   {
      TestEmitter emitter = new TestEmitter();
      TestListener listener = new TestListener();
      emitter.registerListener(listener, null, null);
      emitter.testFire("testtype", null);
      emitter.testFire("testtype", null);
      ArrayList expected = new ArrayList();
      expected.add(EventTestCaseSupport.makeExpected(emitter, "testtype", 0, null, null));
      expected.add(EventTestCaseSupport.makeExpected(emitter, "testtype", 1, null, null));
View Full Code Here

Examples of org.jboss.test.kernel.event.support.TestEmitter.registerListener()

   public void testFilter() throws Throwable
   {
      TestEmitter emitter = new TestEmitter();
      TestListener listener = new TestListener();
      TestFilter filter = new TestFilter();
      emitter.registerListener(listener, filter, null);
      emitter.testFire("testtype", null);
      filter.fireEvent = false;
      emitter.testFire("testtype", null);
      ArrayList expected = new ArrayList();
      expected.add(EventTestCaseSupport.makeExpected(emitter, "testtype", 0, null, null));
View Full Code Here

Examples of org.jboss.test.kernel.event.support.TestEmitter.registerListener()

   {
      TestEmitter emitter = new TestEmitter();
      TestListener listener = new TestListener();
      TestFilter filter = new TestFilter();
      Object handback = new Object();
      emitter.registerListener(listener, filter, handback);
      emitter.testFire("testtype", null);
      ArrayList expected = new ArrayList();
      expected.add(EventTestCaseSupport.makeExpected(emitter, "testtype", 0, null, handback));
      EventTestCaseSupport.check(listener, expected);
      EventTestCaseSupport.check(filter, expected);
View Full Code Here

Examples of org.mule.api.MuleContext.registerListener()

        MuleContext ctx = ctxBuilder.buildMuleContext();
        ctx.initialise();
       
        new DefaultsConfigurationBuilder().configure(ctx);
        NotificationListener listener = new NotificationListener();
        ctx.registerListener(listener);
        ctx.start();
       
        assertTrue(ctx.isInitialised());
        assertFalse(ctx.isInitialising());
        assertTrue(ctx.isStarted());
View Full Code Here

Examples of org.mule.api.transport.Connector.registerListener()

        InboundEndpoint endpoint =
            muleContext.getEndpointFactory().getInboundEndpoint(getTestEndpointURI());

        try
        {
            connector.registerListener(null, null, service);
            fail("cannot register null");
        }
        catch (Exception e)
        {
            // expected
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.