Package org.jboss.remoting.transport.multiplex

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


         // Tell test server to connect.
         os.write(13);
        
         /////////////////////////////////////////////////////////////////////////////////////
         // Get MultiplexingManager.
         MultiplexClientInvoker invoker = (MultiplexClientInvoker) client.getInvoker();
         Field field = MultiplexClientInvoker.class.getDeclaredField("socketGroupInfo");
         field.setAccessible(true);
         Object o = field.get(invoker);
         MultiplexServerInvoker.SocketGroupInfo sgi = (MultiplexServerInvoker.SocketGroupInfo) o;
         VirtualSocket vs = sgi.getPrimingSocket();
View Full Code Here


      client.invoke("foobar");
      Thread.sleep(5000);
      assertTrue(gotCallback);
     
      // Get client invoker's MultiplexingManager.
      MultiplexClientInvoker clientInvoker = (MultiplexClientInvoker) client.getInvoker();
      field = MultiplexClientInvoker.class.getDeclaredField("socketGroupInfo");
      field.setAccessible(true);
      SocketGroupInfo sgi = (SocketGroupInfo) field.get(clientInvoker);
      VirtualSocket socket = sgi.getPrimingSocket();
      field = VirtualSocket.class.getDeclaredField("manager");
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

         assertTrue(serverSocket instanceof VirtualServerSocket);
         VirtualServerSocket vss = (VirtualServerSocket) serverSocket;
         assertTrue(vss.getRemotePort() == serverPort);
         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

         assertTrue(serverSocket instanceof VirtualServerSocket);
         VirtualServerSocket vss = (VirtualServerSocket) serverSocket;
         assertTrue(vss.getRemotePort() == serverPort);
         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

         assertTrue(multiplexServerInvoker.getTimeout() == 300000);
         ServerSocket serverSocket = multiplexServerInvoker.getServerSocket();
         assertTrue(serverSocket instanceof MasterServerSocket);
         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);
         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=600000");

         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() == 600000);
         assertTrue(tester.makeInvocation().equals(new Integer(1)));
         assertTrue(tester.makeInvocation().equals(new Integer(0)));

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

         Thread.sleep(10000);
         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)));

         // Check on virtual MultiplexServerInvoker before it's destroyed by runPushCallbackTest().
         InetSocketAddress address = new InetSocketAddress(serverHost, serverPort);
View Full Code Here

                                                           "&timeout=5000");

         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() == 5000);

         // test socket timeout
         try
         {
            tester.makeInvocation();
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.