axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hawk...@apache.org
Subject svn commit: r291592 - /webservices/axis/trunk/c/tests/utils/monitor/org/apache/test/ClientReturner.java
Date Mon, 26 Sep 2005 10:30:22 GMT
Author: hawkeye
Date: Mon Sep 26 03:30:17 2005
New Revision: 291592

URL: http://svn.apache.org/viewcvs?rev=291592&view=rev
Log:
Improved logic in run

Modified:
    webservices/axis/trunk/c/tests/utils/monitor/org/apache/test/ClientReturner.java

Modified: webservices/axis/trunk/c/tests/utils/monitor/org/apache/test/ClientReturner.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/utils/monitor/org/apache/test/ClientReturner.java?rev=291592&r1=291591&r2=291592&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/utils/monitor/org/apache/test/ClientReturner.java (original)
+++ webservices/axis/trunk/c/tests/utils/monitor/org/apache/test/ClientReturner.java Mon Sep
26 03:30:17 2005
@@ -79,48 +79,52 @@
         int bytesRead=0;
         char[] readBuffer=new char[READ_BUFFER_SIZE];
 
-        while (continueToRun)
+        try
         {
-            try
+            while (continueToRun)
             {
                 bytesRead=serverResponseStream.read(readBuffer, 0,
                         READ_BUFFER_SIZE);
                 //                System.out.println( "Clientreturner got some bytes from
the
                 // server "+bytesRead);
-            }
-            catch (IOException exception)
-            {
-                System.err
-                        .println("IOException when reading in response from server ");
-                exception.printStackTrace(System.err);
-            }
-            if (bytesRead!=-1)
-            {
-                //                    System.out.println( "ClientReturner#run("+number+"):
Writing
-                // to client: "+new String(readBuffer, 0, bytesRead));
-                try
+                if (bytesRead!=-1)
                 {
-                    streamToClient.write(readBuffer, 0, bytesRead);
-                    streamToClient.flush( );
+                    /*System.out.println("ClientReturner#run("+number
+                            +"): Writing to client: "
+                            +new String(readBuffer, 0, bytesRead));
+                            */
+                    try
+                    {
+                        streamToClient.write(readBuffer, 0, bytesRead);
+                        streamToClient.flush( );
+                    }
+                    catch (IOException exception)
+                    {
+                        System.err
+                                .println("IOException when writing server response back to
client");
+                        exception.printStackTrace(System.err);
+
+                    }
+                    // System.out.println("ClientReturner#run(): flushed");
+                    TCPMonitor.getInstance( ).writeResponse(readBuffer,
+                            bytesRead);
+                    System.out.println("About to go around again");
                 }
-                catch (IOException exception)
+                else
                 {
-                    System.err
-                            .println("IOException when writing server response back to client");
-                    exception.printStackTrace(System.err);
+                    //                    System.out.println( "ClientFileReturner#run():
+                    // bytesRead==-1
+                    // "+continueToRun);
 
+                    //continueToRun=false;
                 }
-                //System.out.println( "ClientReturner#run(): flushed");
-                TCPMonitor.getInstance( ).writeResponse(readBuffer, bytesRead);
-                //                    System.out.println( "About to go around again");
-            }
-            else
-            {
-                //                    System.out.println( "ClientFileReturner#run(): bytesRead==-1
-                // "+continueToRun);
-
-                //continueToRun=false;
             }
+        }
+        catch (IOException exception)
+        {
+            System.err
+                    .println("IOException when reading in response from server ");
+            exception.printStackTrace(System.err);
         }
     }
     //        System.out.println( "ClientReturner#run(): exit");



Mime
View raw message