Examples of AddressPair


Examples of org.jboss.remoting.transport.multiplex.utility.AddressPair

         callbackConnector.start();

         assertTrue(callbackConnector.isStarted());
         assertFalse(callbackConnector.getServerInvoker().isStarted());
         assertTrue(MultiplexServerInvoker.getSocketGroupMap().containsKey("id"));
         AddressPair addressPair = new AddressPair("localhost", connectPort, "localhost", freePort);
         assertFalse(MultiplexServerInvoker.getAddressPairMap().containsKey(addressPair));
        
         int CLIENT_COUNT = 5;
         Client[] clients = new Client[CLIENT_COUNT];
         String locatorURI = serverLocatorURI + "/?clientMultiplexId=id";
View Full Code Here

Examples of org.jboss.remoting.transport.multiplex.utility.AddressPair

         callbackConnector.start();

         assertTrue(callbackConnector.isStarted());
         assertFalse(callbackConnector.getServerInvoker().isStarted());
         assertTrue(MultiplexServerInvoker.getSocketGroupMap().containsKey("id"));
         AddressPair addressPair = new AddressPair("localhost", connectPort, "localhost", freePort);
         assertFalse(MultiplexServerInvoker.getAddressPairMap().containsKey(addressPair));
        
         int CLIENT_COUNT = 5;
         Client[] clients = new Client[CLIENT_COUNT];
         Object o = MultiplexServerInvoker.getSocketGroupMap().get("id");
View Full Code Here

Examples of org.jboss.remoting.transport.multiplex.utility.AddressPair

         callbackConnector.start();

         assertTrue(callbackConnector.isStarted());
         assertFalse(callbackConnector.getServerInvoker().isStarted());
         assertTrue(MultiplexServerInvoker.getSocketGroupMap().containsKey("id"));
         AddressPair addressPair = new AddressPair("localhost", connectPort, "localhost", freePort);
         assertFalse(MultiplexServerInvoker.getAddressPairMap().containsKey(addressPair));
        
         Client[] clients = new Client[5];
         Object o = MultiplexServerInvoker.getSocketGroupMap().get("id");
         MultiplexServerInvoker.SocketGroupInfo socketGroupInfo = (MultiplexServerInvoker.SocketGroupInfo) o;
View Full Code Here

Examples of org.jboss.remoting.transport.multiplex.utility.AddressPair

      log.info("entering testMultipleClientsMixedLocatorsNoServer()");
     
      try
      {
         int freePort = PortUtil.findFreePort("localhost");
         AddressPair addressPair = new AddressPair("localhost", connectPort, "localhost", freePort);
         Client[] clients = new Client[5];
        
         String basicLocatorURI = serverLocatorURI;
         basicLocatorURI += "/?clientMultiplexId=id&muiltiplexBindHost=localhost&multiplexBindPort=" + freePort;
         InvokerLocator locatorClient = new InvokerLocator(basicLocatorURI + "&invoker=1");
View Full Code Here

Examples of org.jboss.remoting.transport.multiplex.utility.AddressPair

         callbackConnector.start();

         assertTrue(callbackConnector.isStarted());
         assertTrue(callbackConnector.getServerInvoker().isStarted());
         assertTrue(MultiplexServerInvoker.getSocketGroupMap().containsKey("id"));
         AddressPair addressPair = new AddressPair("localhost", connectPort, "localhost", freePort);
         assertTrue(MultiplexServerInvoker.getAddressPairMap().containsKey(addressPair));
        
         callbackConnector.stop();

         assertFalse(MultiplexServerInvoker.getSocketGroupMap().containsKey("id"));
View Full Code Here

Examples of org.jboss.remoting.transport.multiplex.utility.AddressPair

         Connector callbackConnector1 = new Connector(callbackURI);
        
         callbackConnector1.start();
         assertTrue(callbackConnector1.isStarted());
         assertTrue(MultiplexServerInvoker.getSocketGroupMap().containsKey("id"));
         AddressPair addressPair = new AddressPair("localhost", connectPort, "localhost", freePort);
         assertTrue(MultiplexServerInvoker.getAddressPairMap().containsKey(addressPair));
        
         try
         {
            Connector callbackConnector2  = new Connector(callbackURI + "&blah");
View Full Code Here

Examples of org.jboss.remoting.transport.multiplex.utility.AddressPair

      if (socketGroupInfo != null && addressPair == null)
      {
         String connectHost = socketGroupInfo.getConnectAddress().getHostName();
         int connectPort = socketGroupInfo.getConnectPort();
         addressPair = new AddressPair(connectHost, connectPort, bindHost, bindPort);
      }

      try
      {
         super.start();
View Full Code Here

Examples of org.jboss.remoting.transport.multiplex.utility.AddressPair

               createPrimingSocket(socketGroupInfo, connectAddress.getHostName(), connectPort,
                                   bindAddress, bindPort, socketFactory, getTimeout());

            // We got socketGroupInfo by socketGroupId.  Make sure it is also stored by AddressPair.
            connectHost = connectAddress.getHostName();
            addressPair = new AddressPair(connectHost, connectPort, bindHost, bindPort);
            addressPairMap.put(addressPair, socketGroupInfo);

            return;
         }

         connectHost = (String) parameters.get(MULTIPLEX_CONNECT_HOST_KEY);
         connectPortString = (String) parameters.get(MULTIPLEX_CONNECT_PORT_KEY);

         if (connectHost != null && connectPortString == null)
         {
            throw new IOException("multiplexConnectHost != null and multiplexConnectPort == null");
         }

         if (connectHost == null && connectPortString != null)
         {
            throw new IOException("multiplexConnectHost == null and multiplexConnectPort != null");
         }

         // server rule 2.
         if (connectHost != null)
         {
            log.debug("server rule 2");
            isVirtual = true;

            try
            {
               connectPort = Integer.parseInt(connectPortString);
            }
            catch (NumberFormatException e)
            {
               throw new IOException("number format error for callbackPort: " + connectPortString);
            }

            connectSocketAddress = new InetSocketAddress(connectHost, connectPort);
            addressPair = new AddressPair(connectHost, connectPort, bindHost, bindPort);
            socketGroupInfo = (SocketGroupInfo) addressPairMap.get(addressPair);

            // If socketGroupInfo exists, it's because it was created, along with a priming socket (if necessary),
            // by a MultiplexClientInvoker.
            if (socketGroupInfo != null)
View Full Code Here

Examples of org.jboss.remoting.transport.multiplex.utility.AddressPair

      if (socketGroupInfo != null && addressPair == null)
      {
         String bindHost = socketGroupInfo.getBindAddress().getHostName();
         int bindPort = socketGroupInfo.getBindPort();
         addressPair = new AddressPair(connectHost, connectPort, bindHost, bindPort);
      }

      readyToRun = true;
   }
View Full Code Here

Examples of org.jboss.remoting.transport.multiplex.utility.AddressPair

                                                          getSocketFactory(), timeout);
            }

            // We got socketGroupInfo by socketGroupId.  Make sure it is also stored by AddressPair.
            bindHost = bindAddress.getHostName();
            addressPair = new AddressPair(connectHost, connectPort, bindHost, bindPort);
            MultiplexServerInvoker.getAddressPairMap().put(addressPair, socketGroupInfo);

            MultiplexServerInvoker serverInvoker = socketGroupInfo.getServerInvoker();
            if (serverInvoker != null)
               serverInvoker.finishStart();

            finishStart();
            return;
         }

         bindHost = (String) parameters.get(MULTIPLEX_BIND_HOST_KEY);
         bindPortString = (String) parameters.get(MULTIPLEX_BIND_PORT_KEY);

         if (bindHost != null && bindPortString == null)
         {
            bindPortString = "0";
         }

         if (bindHost == null && bindPortString != null)
         {
            bindHost = "localhost";
         }

         if (bindHost != null)
         {
            log.debug("client rule 2");

            try
            {
               bindPort = Integer.parseInt(bindPortString);
            }
            catch (NumberFormatException e)
            {
               throw new IOException("number format error for bindPort: " + bindPortString);
            }

            bindSocketAddress = new InetSocketAddress(bindHost, bindPort);
            addressPair = new AddressPair(connectHost, connectPort, bindHost, bindPort);
            socketGroupInfo = (SocketGroupInfo) MultiplexServerInvoker.getAddressPairMap().get(addressPair);

            // If socketGroupInfo exists, it's because it was created, along with a priming socket, by a
            // MultiplexServerInvoker.
            if (socketGroupInfo != null)
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.