Commented out all logging messages from the pick code to speed up message transfer.
authorimilne <imilne@issues.jalview.org>
Fri, 15 Dec 2006 11:27:30 +0000 (11:27 +0000)
committerimilne <imilne@issues.jalview.org>
Fri, 15 Dec 2006 11:27:30 +0000 (11:27 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@313 be28352e-c001-0410-b1a7-c7978e42abec

src/uk/ac/vamsas/client/picking/PickEndPoint.java
src/uk/ac/vamsas/client/picking/PickServer.java
src/uk/ac/vamsas/client/picking/SocketManager.java

index e62c79e..ac45278 100644 (file)
@@ -37,15 +37,15 @@ class PickEndPoint extends Thread
                        in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\r
                \r
                        // Start the thread to listen for incoming messages\r
-                       logger.info("CLIENT: connection successful to port "\r
-                               + socket.getPort() + " via port " + socket.getLocalPort());\r
+//                     logger.info("CLIENT: connection successful to port "\r
+//                             + socket.getPort() + " via port " + socket.getLocalPort());\r
                        start();\r
                        \r
                        return true;\r
                }\r
                catch (Exception e)\r
                {\r
-                       logger.info("CLIENT: connection failed: " + e);\r
+                       //logger.info("CLIENT: connection failed: " + e);\r
                        return false;\r
                }\r
        }\r
@@ -56,7 +56,7 @@ class PickEndPoint extends Thread
                {\r
                        String str = message.getRawMessage();\r
                        \r
-                       logger.info("CLIENT: send " + str + " to " + rPort);\r
+                       //logger.info("CLIENT: send " + str + " to " + rPort);\r
                        os.write(str);\r
                        \r
                        // We use a newline to terminate the message\r
@@ -65,7 +65,7 @@ class PickEndPoint extends Thread
                }\r
                catch (Exception e)\r
                {\r
-                       logger.info("CLIENT: failed to send");\r
+                       //logger.info("CLIENT: failed to send");\r
                        \r
                        // TODO: terminate the connection on a failed send or retry?\r
                        terminate();\r
@@ -80,7 +80,7 @@ class PickEndPoint extends Thread
                        while (true)\r
                        {\r
                                String str = in.readLine();                             \r
-                               logger.info("CLIENT: recv " + str + " from " + rPort);\r
+                               //logger.info("CLIENT: recv " + str + " from " + rPort);\r
                                \r
                                // TODO: Spawn this off into the GUI Event-Dispatch thread...\r
                                \r
@@ -96,7 +96,7 @@ class PickEndPoint extends Thread
                {\r
                        // Means the other end of the connection has (probably died) so we need\r
                        // terminate this endpoint (if this is server side)\r
-                       logger.info("CLIENT: read failed: " + e);\r
+                       //logger.info("CLIENT: read failed: " + e);\r
                                                \r
                        terminate();\r
                }\r
@@ -107,7 +107,7 @@ class PickEndPoint extends Thread
                try { socket.close(); }\r
                catch (IOException e) {}\r
                \r
-               logger.info("CLIENT: closing connection to port " + socket.getPort());\r
+               //logger.info("CLIENT: closing connection to port " + socket.getPort());\r
                manager.removeEndPoint(this);\r
        }\r
        \r
@@ -123,7 +123,7 @@ class PickEndPoint extends Thread
                }\r
                catch (Exception e)\r
                {\r
-                       logger.info("Unable to reconstruct message: " + e);\r
+                       //logger.info("Unable to reconstruct message: " + e);\r
                }\r
                \r
                return null;\r
index 2247049..2590613 100644 (file)
@@ -51,7 +51,7 @@ class PickServer extends Thread
                }\r
                catch (IOException e)\r
                {\r
-                       logger.info("SERVER: " + e);\r
+                       //logger.info("SERVER: " + e);\r
                        return false;\r
                }\r
        }\r
@@ -63,7 +63,7 @@ class PickServer extends Thread
         */\r
        public void run()\r
        {\r
-               logger.info("SERVER: listening on " + PORT + " - SERVER");\r
+               //logger.info("SERVER: listening on " + PORT + " - SERVER");\r
                \r
                // Loop forever, accepting connectons from other clients\r
                // TODO: add in the ability to terminate the server if a VAMSAS session\r
@@ -73,7 +73,7 @@ class PickServer extends Thread
                        try\r
                        {\r
                                Socket socket = serverSocket.accept();                          \r
-                               logger.info("SERVER: connection detected");\r
+                               //logger.info("SERVER: connection detected");\r
                                \r
                                manager.addEndPoint(socket);\r
                        }\r
index f4f4ab7..edfd573 100644 (file)
@@ -64,7 +64,7 @@ public class SocketManager implements IPickManager
                if (client.openConnection())\r
                {\r
                        clients.add(client);\r
-                       logger.info("List now contains " + clients.size() + " client(s)");\r
+                       //logger.info("List now contains " + clients.size() + " client(s)");\r
                        return true;\r
                }\r
                \r
@@ -113,8 +113,8 @@ public class SocketManager implements IPickManager
                        \r
                if (msgHandler != null)\r
                        msgHandler.handleMessage(message);\r
-               else\r
-                       logger.info("No handler available to deal with incoming message");\r
+//             else\r
+//                     logger.info("No handler available to deal with incoming message");\r
        }\r
        \r
        /**\r
@@ -125,7 +125,7 @@ public class SocketManager implements IPickManager
        synchronized void removeEndPoint(PickEndPoint client)\r
        {\r
                clients.remove(client);\r
-               logger.info("List now contains " + clients.size() + " client(s)");\r
+               //logger.info("List now contains " + clients.size() + " client(s)");\r
                \r
                // If there's no endpoints left, then we've lost all connections and\r
                // need to reinitialize\r
@@ -140,7 +140,7 @@ public class SocketManager implements IPickManager
        {\r
                public void run()\r
                {\r
-                       logger.info("Initializing connection...");\r
+                       //logger.info("Initializing connection...");\r
                        boolean connected = false;\r
                        \r
                        // Loop until we can get a connection (one way or the other)\r