Package org.jboss.remoting.transport.multiplex.MultiplexServerInvoker

Examples of org.jboss.remoting.transport.multiplex.MultiplexServerInvoker.SocketGroupInfo


               finishStart();
               return;
            }

            socketGroupInfo = new SocketGroupInfo();
            socketGroupInfo.setConnectAddress(connectAddress);
            socketGroupInfo.setConnectPort(connectPort);
            socketGroupInfo.addClientInvoker(this);

            // Set bindAddress and bindPort to be able to test for inconsistencies with bind address
            // and bind port determined by companion MultiplexServerInvoker.
            bindAddress = InetAddress.getByName(bindHost);
            socketGroupInfo.setBindAddress(bindAddress);
            socketGroupInfo.setBindPort(bindPort);

            String connectHost = connectAddress.getHostName();
            MultiplexServerInvoker.createPrimingSocket(socketGroupInfo, connectHost, connectPort,
                                                       bindAddress, bindPort, getSocketFactory(), timeout);
            MultiplexServerInvoker.getAddressPairMap().put(addressPair, socketGroupInfo);

            if (socketGroupId != null)
            {
               socketGroupInfo.setSocketGroupId(socketGroupId);
               MultiplexServerInvoker.getSocketGroupMap().put(socketGroupId, socketGroupInfo);
            }

            finishStart();
            return;
         }

         if (socketGroupId != null)
         {
            log.debug("client rule 3");

            if (socketGroupInfo == null)
            {
               socketGroupInfo = new SocketGroupInfo();
               socketGroupInfo.setSocketGroupId(socketGroupId);
               socketGroupInfo.setConnectAddress(connectAddress);
               socketGroupInfo.setConnectPort(connectPort);
               MultiplexServerInvoker.getSocketGroupMap().put(socketGroupId, socketGroupInfo);
            }
View Full Code Here


     
      // 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");
      field.setAccessible(true);
      MultiplexingManager clientManager = (MultiplexingManager) field.get(socket);
      assertNotNull(clientManager);
     
View Full Code Here

        
         // Verify that MultiplexServerInvoker has a positive bind port.
         MultiplexServerInvoker invoker = (MultiplexServerInvoker) callbackConnector.getServerInvoker();
         Field field = MultiplexServerInvoker.class.getDeclaredField("socketGroupInfo");
         field.setAccessible(true);
         SocketGroupInfo socketGroupInfo = (SocketGroupInfo) field.get(invoker);
         assertTrue(socketGroupInfo.getBindPort() > 0);
        
         // Verify callback MultiplexServerInvoker has not started (rule 3).
         assertFalse(callbackConnector.getServerInvoker().isStarted());
        
         // Create Client.
View Full Code Here

        
         // Verify that MultiplexServerInvoker has a positive bind port.
         MultiplexServerInvoker invoker = (MultiplexServerInvoker) callbackConnector.getServerInvoker();
         Field field = MultiplexServerInvoker.class.getDeclaredField("socketGroupInfo");
         field.setAccessible(true);
         SocketGroupInfo socketGroupInfo = (SocketGroupInfo) field.get(invoker);
         assertTrue(socketGroupInfo.getBindPort() > 0);
        
         // Verify callback MultiplexServerInvoker has not started.
         assertFalse(callbackConnector.getServerInvoker().isStarted());
        
         // Create Client.
View Full Code Here

            // Anonymous bind port
            if (bindPort == 0)
               bindPort = PortUtil.findFreePort(bindHost);

            socketGroupInfo = new SocketGroupInfo();
            socketGroupInfo.setConnectAddress(connectAddress);
            socketGroupInfo.setConnectPort(connectPort);
            socketGroupInfo.addClientInvoker(this);

            // Set bindAddress and bindPort to be able to test for inconsistencies with bind address
            // and bind port determined by companion MultiplexServerInvoker.
            bindAddress = InetAddress.getByName(bindHost);
            socketGroupInfo.setBindAddress(bindAddress);
            socketGroupInfo.setBindPort(bindPort);

            String connectHost = connectAddress.getHostName();
            MultiplexServerInvoker.createPrimingSocket(socketGroupInfo, connectHost, connectPort,
                                                       bindAddress, bindPort, configuration, timeout);
            MultiplexServerInvoker.getAddressPairMap().put(addressPair, socketGroupInfo);

            if (socketGroupId != null)
            {
               socketGroupInfo.setSocketGroupId(socketGroupId);
               MultiplexServerInvoker.getSocketGroupMap().put(socketGroupId, socketGroupInfo);
            }

            finishStart();
            return;
         }

         if (socketGroupId != null)
         {
            log.debug("client rule 3");

            if (socketGroupInfo == null)
            {
               socketGroupInfo = new SocketGroupInfo();
               socketGroupInfo.setSocketGroupId(socketGroupId);
               socketGroupInfo.setConnectAddress(connectAddress);
               socketGroupInfo.setConnectPort(connectPort);
               MultiplexServerInvoker.getSocketGroupMap().put(socketGroupId, socketGroupInfo);
            }

            socketGroupInfo.addClientInvoker(this);
            return;
         }

         log.debug("client rule 4");
         String connectHost = connectAddress.getHostName();
         socketGroupInfo = new SocketGroupInfo();
         MultiplexServerInvoker.createPrimingSocket(socketGroupInfo, connectHost, connectPort,
                                                    configuration, timeout);
         finishStart();
      }
   }
View Full Code Here

            // Anonymous bind port
            if (bindPort == 0)
               bindPort = PortUtil.findFreePort(bindHost);

            socketGroupInfo = new SocketGroupInfo();
            socketGroupInfo.setConnectAddress(connectAddress);
            socketGroupInfo.setConnectPort(connectPort);
            socketGroupInfo.addClientInvoker(this);

            // Set bindAddress and bindPort to be able to test for inconsistencies with bind address
            // and bind port determined by companion MultiplexServerInvoker.
            bindAddress = InetAddress.getByName(bindHost);
            socketGroupInfo.setBindAddress(bindAddress);
            socketGroupInfo.setBindPort(bindPort);

            String connectHost = connectAddress.getHostName();
            MultiplexServerInvoker.createPrimingSocket(socketGroupInfo, connectHost, connectPort,
                                                       bindAddress, bindPort, configuration, timeout);
            MultiplexServerInvoker.getAddressPairMap().put(addressPair, socketGroupInfo);

            if (socketGroupId != null)
            {
               socketGroupInfo.setSocketGroupId(socketGroupId);
               MultiplexServerInvoker.getSocketGroupMap().put(socketGroupId, socketGroupInfo);
            }

            finishStart();
            return;
         }

         if (socketGroupId != null)
         {
            log.debug("client rule 3");

            if (socketGroupInfo == null)
            {
               socketGroupInfo = new SocketGroupInfo();
               socketGroupInfo.setSocketGroupId(socketGroupId);
               socketGroupInfo.setConnectAddress(connectAddress);
               socketGroupInfo.setConnectPort(connectPort);
               MultiplexServerInvoker.getSocketGroupMap().put(socketGroupId, socketGroupInfo);
            }

            socketGroupInfo.addClientInvoker(this);
            return;
         }

         log.debug("client rule 4");
         String connectHost = connectAddress.getHostName();
         socketGroupInfo = new SocketGroupInfo();
         MultiplexServerInvoker.createPrimingSocket(socketGroupInfo, connectHost, connectPort,
                                                    configuration, timeout);
         finishStart();
      }
   }
View Full Code Here

            // Anonymous bind port
            if (bindPort == 0)
               bindPort = PortUtil.findFreePort(bindHost);

            socketGroupInfo = new SocketGroupInfo();
            socketGroupInfo.setConnectAddress(connectAddress);
            socketGroupInfo.setConnectPort(connectPort);
            socketGroupInfo.addClientInvoker(this);

            // Set bindAddress and bindPort to be able to test for inconsistencies with bind address
            // and bind port determined by companion MultiplexServerInvoker.
            bindAddress = InetAddress.getByName(bindHost);
            socketGroupInfo.setBindAddress(bindAddress);
            socketGroupInfo.setBindPort(bindPort);

            String connectHost = connectAddress.getHostName();
            MultiplexServerInvoker.createPrimingSocket(socketGroupInfo, connectHost, connectPort,
                                                       bindAddress, bindPort, configuration, timeout);
            MultiplexServerInvoker.getAddressPairMap().put(addressPair, socketGroupInfo);

            if (socketGroupId != null)
            {
               socketGroupInfo.setSocketGroupId(socketGroupId);
               MultiplexServerInvoker.getSocketGroupMap().put(socketGroupId, socketGroupInfo);
            }

            finishStart();
            return;
         }

         if (socketGroupId != null)
         {
            log.debug("client rule 3");

            if (socketGroupInfo == null)
            {
               socketGroupInfo = new SocketGroupInfo();
               socketGroupInfo.setSocketGroupId(socketGroupId);
               socketGroupInfo.setConnectAddress(connectAddress);
               socketGroupInfo.setConnectPort(connectPort);
               MultiplexServerInvoker.getSocketGroupMap().put(socketGroupId, socketGroupInfo);
            }

            socketGroupInfo.addClientInvoker(this);
            return;
         }

         log.debug("client rule 4");
         String connectHost = connectAddress.getHostName();
         socketGroupInfo = new SocketGroupInfo();
         MultiplexServerInvoker.createPrimingSocket(socketGroupInfo, connectHost, connectPort,
                                                    configuration, timeout);
         finishStart();
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.remoting.transport.multiplex.MultiplexServerInvoker.SocketGroupInfo

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.