Package org.jboss.remoting.transport.multiplex

Examples of org.jboss.remoting.transport.multiplex.MultiplexClientInvoker


                                                           "&timeout=60000");

         tester.createRemotingClient(serverLocator.getLocatorURI());
         assertTrue(InvokerRegistry.isClientInvokerRegistered(serverLocator));
         ClientInvoker[] clientInvokers = InvokerRegistry.getClientInvokers();
         MultiplexClientInvoker multiplexClientInvoker = null;

         for(int i = 0; i < clientInvokers.length; i++)
         {
            if(clientInvokers[i].getLocator().equals(serverLocator))
            {
               if(clientInvokers[i] instanceof MultiplexClientInvoker)
               {
                  multiplexClientInvoker = (MultiplexClientInvoker) clientInvokers[i];
               }
            }
         }

         assertTrue(multiplexClientInvoker != null);
         assertTrue(multiplexClientInvoker.getLocator().equals(serverLocator));
         assertTrue(multiplexClientInvoker.getTimeout() == 60000);
         assertTrue(tester.makeInvocation().equals(new Integer(1)));
         assertTrue(tester.makeInvocation().equals(new Integer(0)));

         // test pull callbacks
         assertTrue(tester.runPullCallbackTest());
View Full Code Here


                                                           "&timeout=60000");

         tester.createRemotingClient(serverLocator.getLocatorURI());
         assertTrue(InvokerRegistry.isClientInvokerRegistered(serverLocator));
         ClientInvoker[] clientInvokers = InvokerRegistry.getClientInvokers();
         MultiplexClientInvoker multiplexClientInvoker = null;

         for(int i = 0; i < clientInvokers.length; i++)
         {
            if(clientInvokers[i].getLocator().equals(serverLocator))
            {
               if(clientInvokers[i] instanceof MultiplexClientInvoker)
               {
                  multiplexClientInvoker = (MultiplexClientInvoker) clientInvokers[i];
               }
            }
         }

         assertTrue(multiplexClientInvoker != null);
         assertTrue(multiplexClientInvoker.getLocator().equals(serverLocator));
         assertTrue(multiplexClientInvoker.getTimeout() == 60000);

         // test push callbacks
         assertTrue(tester.runPushCallbackTest(callbackLocator));

         // test pull callbacks
View Full Code Here

                                                           "&timeout=60000");

         tester.createRemotingClient(serverLocator.getLocatorURI());
         assertTrue(InvokerRegistry.isClientInvokerRegistered(serverLocator));
         ClientInvoker[] clientInvokers = InvokerRegistry.getClientInvokers();
         MultiplexClientInvoker multiplexClientInvoker = null;

         for(int i = 0; i < clientInvokers.length; i++)
         {
            if(clientInvokers[i].getLocator().equals(serverLocator))
            {
               if(clientInvokers[i] instanceof MultiplexClientInvoker)
               {
                  multiplexClientInvoker = (MultiplexClientInvoker) clientInvokers[i];
               }
            }
         }

         assertTrue(multiplexClientInvoker != null);
         assertTrue(multiplexClientInvoker.getLocator().equals(serverLocator));
         assertTrue(multiplexClientInvoker.getTimeout() == 60000);
         assertTrue(tester.makeInvocation().equals(new Integer(1)));
         assertTrue(tester.makeInvocation().equals(new Integer(0)));

         // test pull callbacks
         assertTrue(tester.runPullCallbackTest());
View Full Code Here

      Client client = new Client(clientLocator, configuration);
      client.connect();
      log.info("Created client");

      // should NOT get same client invoker as the one for client above since config passed is not the same
      MultiplexClientInvoker clientInvoker1 = (MultiplexClientInvoker) InvokerRegistry.createClientInvoker(clientLocator);
      assertEquals(MultiplexClientInvoker.SO_TIMEOUT_DEFAULT, clientInvoker1.getTimeout());
      assertNotSame(client.getInvoker(), clientInvoker1);

      // should get the same client invoker as the one for client above since config passed *is* the same
      MultiplexClientInvoker clientInvoker2 = (MultiplexClientInvoker) InvokerRegistry.createClientInvoker(clientLocator, configuration);
      assertEquals(123456, clientInvoker2.getTimeout());
      assertSame(client.getInvoker(), clientInvoker2);

      Map configuration2 = new HashMap();
      configuration2.put(SocketClientInvoker.SO_TIMEOUT_FLAG, "123456");
      // should *not* get the same client invoker as the one for client above since config passed is not the same
      MultiplexClientInvoker clientInvoker3 = (MultiplexClientInvoker) InvokerRegistry.createClientInvoker(clientLocator, configuration2);
      assertEquals(123456, clientInvoker3.getTimeout());
      assertNotSame(client.getInvoker(), clientInvoker3);

      // now to test ref counting in invoker registry
      ClientInvoker originalInvoker = client.getInvoker();
      // this should remove one of the reference counts to original invoker
View Full Code Here

TOP

Related Classes of org.jboss.remoting.transport.multiplex.MultiplexClientInvoker

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.