Package org.jboss.remoting.transport.multiplex.utility

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


/* 223 */         this.socketGroupInfo.setConnectAddress(this.connectAddress);
/* 224 */         this.socketGroupInfo.setConnectPort(this.connectPort);
/* 225 */         this.socketGroupInfo.addClientInvoker(this);
/*     */
/* 228 */         String bindHost = bindAddress.getHostName();
/* 229 */         this.addressPair = new AddressPair(this.connectHost, this.connectPort, bindHost, bindPort);
/* 230 */         MultiplexServerInvoker.getAddressPairMap().put(this.addressPair, this.socketGroupInfo);
/*     */
/* 232 */         MultiplexServerInvoker serverInvoker = this.socketGroupInfo.getServerInvoker();
/* 233 */         if (serverInvoker != null) {
/* 234 */           serverInvoker.finishStart();
/*     */         }
/* 236 */         finishStart();
/* 237 */         return;
/*     */       }
/*     */
/* 240 */       String bindHost = (String)parameters.get("multiplexBindHost");
/* 241 */       String bindPortString = (String)parameters.get("multiplexBindPort");
/*     */
/* 243 */       if ((bindHost != null) && (bindPortString == null))
/*     */       {
/* 245 */         bindPortString = "0";
/*     */       }
/*     */
/* 248 */       if ((bindHost == null) && (bindPortString != null))
/*     */       {
/* 250 */         bindHost = "localhost";
/*     */       }
/*     */
/* 253 */       if (bindHost != null)
/*     */       {
/* 255 */         log.debug("client rule 2");
/*     */         try
/*     */         {
/* 259 */           bindPort = Integer.parseInt(bindPortString);
/*     */         }
/*     */         catch (NumberFormatException e)
/*     */         {
/* 263 */           throw new IOException("number format error for bindPort: " + bindPortString);
/*     */         }
/*     */
/* 266 */         if (bindPort != 0)
/*     */         {
/* 268 */           this.bindSocketAddress = new InetSocketAddress(bindHost, bindPort);
/* 269 */           this.addressPair = new AddressPair(this.connectHost, this.connectPort, bindHost, bindPort);
/* 270 */           this.socketGroupInfo = ((MultiplexServerInvoker.SocketGroupInfo)MultiplexServerInvoker.getAddressPairMap().get(this.addressPair));
/*     */         }
/*     */
/* 276 */         if (this.socketGroupInfo != null)
/*     */         {
View Full Code Here


     
      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

                             bindAddress, bindPort, configuration, getTimeout());
      }

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

   {
      log.debug("server rule 2");
      isVirtual = true;

      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

          socketGroupInfo.getBindAddress() != 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

            socketGroupInfo.setConnectPort(connectPort);
            socketGroupInfo.addClientInvoker(this);

            // 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.MULTIPLEX_BIND_HOST);
         bindPortString = (String) parameters.get(Multiplex.MULTIPLEX_BIND_PORT);

         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);
            }

            if (bindPort != 0)
            {
               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.  Note that we don't look for a match if the bind port was
View Full Code Here

     
      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

                             bindAddress, bindPort, configuration, getTimeout());
      }

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

   {
      log.debug("server rule 2");
      isVirtual = true;

      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

TOP

Related Classes of org.jboss.remoting.transport.multiplex.utility.AddressPair

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.