[jboss-cvs] JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/connection ...

Ron Sigal ron_sigal at yahoo.com
Wed Dec 27 01:26:54 EST 2006


  User: rsigal  
  Date: 06/12/27 01:26:54

  Modified:    src/tests/org/jboss/test/remoting/transport/socket/connection    
                        SocketTestServer.java
                        SocketConnectionCheckTestClient.java
                        SocketTestClient.java
                        SocketConnectionCheckTestServer.java
  Log:
  JBREM-650:  Added ability to override transport and, in some cases, port.
  
  Revision  Changes    Path
  1.6       +14 -2     JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/connection/SocketTestServer.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SocketTestServer.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/connection/SocketTestServer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- SocketTestServer.java	9 Nov 2006 02:50:19 -0000	1.5
  +++ SocketTestServer.java	27 Dec 2006 06:26:54 -0000	1.6
  @@ -26,8 +26,10 @@
   import org.jboss.remoting.InvokerLocator;
   import org.jboss.remoting.ServerInvocationHandler;
   import org.jboss.remoting.ServerInvoker;
  +import org.jboss.remoting.Version;
   import org.jboss.remoting.callback.InvokerCallbackHandler;
   import org.jboss.remoting.transport.Connector;
  +import org.jboss.remoting.transport.socket.SocketServerInvoker;
   
   import javax.management.MBeanServer;
   
  @@ -83,7 +85,7 @@
      {
         //String locatorURI = transport + "://" + host + ":" + port + "/?" + SocketServerInvoker.CHECK_CONNECTION_KEY + "=" + Boolean.TRUE;
         //String locatorURI = transport + "://" + host + ":" + port + "/?" + InvokerLocator.SERIALIZATIONTYPE + "=jboss";
  -      String locatorURI = transport + "://" + host + ":" + port;
  +      String locatorURI = getTransport() + "://" + host + ":" + getPort();
         setupServer(locatorURI);
      }
   
  @@ -119,6 +121,16 @@
         }
      }
   
  +   protected String getTransport()
  +   {
  +      return transport;
  +   }
  +   
  +   protected int getPort()
  +   {
  +      return port;
  +   }
  +   
      /**
       * Simple invocation handler implementation.
       * This is the code that will be called with the invocation payload from the client.
  
  
  
  1.4       +11 -1     JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/connection/SocketConnectionCheckTestClient.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SocketConnectionCheckTestClient.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/connection/SocketConnectionCheckTestClient.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- SocketConnectionCheckTestClient.java	9 Nov 2006 02:50:19 -0000	1.3
  +++ SocketConnectionCheckTestClient.java	27 Dec 2006 06:26:54 -0000	1.4
  @@ -23,7 +23,7 @@
         {
   
   
  -         String locatorURI = transport + "://" + host + ":" + port + "/?" + SocketServerInvoker.CHECK_CONNECTION_KEY + "=" + Boolean.TRUE;
  +         String locatorURI = getTransport() + "://" + host + ":" + getPort() + "/?" + SocketServerInvoker.CHECK_CONNECTION_KEY + "=" + Boolean.TRUE;
   
            // create InvokerLocator with the url type string
            // indicating the target remoting server to call upon.
  @@ -66,6 +66,16 @@
   
      }
   
  +   protected String getTransport()
  +   {
  +      return transport;
  +   }
  +   
  +   protected int getPort()
  +   {
  +      return port;
  +   }
  +
      /**
       * Can pass transport and port to be used as parameters.
       * Valid transports are 'rmi' and 'socket'.
  
  
  
  1.9       +13 -4     JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/connection/SocketTestClient.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SocketTestClient.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/connection/SocketTestClient.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- SocketTestClient.java	12 Nov 2006 04:30:18 -0000	1.8
  +++ SocketTestClient.java	27 Dec 2006 06:26:54 -0000	1.9
  @@ -22,17 +22,16 @@
   package org.jboss.test.remoting.transport.socket.connection;
   
   import junit.framework.TestCase;
  -
  -import org.jboss.logging.Logger;
   import org.jboss.remoting.Client;
   import org.jboss.remoting.InvokerLocator;
  +import org.jboss.remoting.Version;
  +import org.jboss.remoting.transport.socket.SocketServerInvoker;
   
   /**
    * @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
    */
   public class SocketTestClient extends TestCase
   {
  -   private static Logger log = Logger.getLogger(SocketTestClient.class);
      // Default locator values
      private static String transport = "socket";
      private static String host = "localhost";
  @@ -54,7 +53,7 @@
   
            //String locatorURI = transport + "://" + host + ":" + port + "/?" + SocketServerInvoker.CHECK_CONNECTION_KEY + "=" + Boolean.TRUE;
            //String locatorURI = transport + "://" + host + ":" + port + "/?" + InvokerLocator.SERIALIZATIONTYPE + "=jboss";
  -         String locatorURI = transport + "://" + host + ":" + port;
  +         String locatorURI = getTransport() + "://" + host + ":" + getPort();
   
            // create InvokerLocator with the url type string
            // indicating the target remoting server to call upon.
  @@ -125,4 +124,14 @@
      }
   
   
  +   protected String getTransport()
  +   {
  +      return transport;
  +   }
  +   
  +   protected int getPort()
  +   {
  +      return port;
  +   }
  +
   }
  \ No newline at end of file
  
  
  
  1.4       +11 -1     JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/connection/SocketConnectionCheckTestServer.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SocketConnectionCheckTestServer.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/transport/socket/connection/SocketConnectionCheckTestServer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- SocketConnectionCheckTestServer.java	9 Nov 2006 02:50:19 -0000	1.3
  +++ SocketConnectionCheckTestServer.java	27 Dec 2006 06:26:54 -0000	1.4
  @@ -58,7 +58,7 @@
   
      public void setUp() throws Exception
      {
  -      String locatorURI = transport + "://" + host + ":" + port + "/?" + SocketServerInvoker.CHECK_CONNECTION_KEY + "=" + Boolean.TRUE;
  +      String locatorURI = getTransport() + "://" + host + ":" + getPort() + "/?" + SocketServerInvoker.CHECK_CONNECTION_KEY + "=" + Boolean.TRUE;
         setupServer(locatorURI);
      }
   
  @@ -94,6 +94,16 @@
         }
      }
   
  +   protected String getTransport()
  +   {
  +      return transport;
  +   }
  +   
  +   protected int getPort()
  +   {
  +      return port;
  +   }
  +   
      /**
       * Simple invocation handler implementation.
       * This is the code that will be called with the invocation payload from the client.
  
  
  



More information about the jboss-cvs-commits mailing list