You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ha...@apache.org on 2004/09/21 17:55:11 UTC

cvs commit: ws-axis/c/tests/utils/monitor/org/apache/test RequestForwarder.java

hawkeye     2004/09/21 08:55:11

  Modified:    c/tests/utils/monitor/org/apache/test RequestForwarder.java
  Log:
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.2       +9 -4      ws-axis/c/tests/utils/monitor/org/apache/test/RequestForwarder.java
  
  Index: RequestForwarder.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/utils/monitor/org/apache/test/RequestForwarder.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RequestForwarder.java	3 Sep 2004 15:43:27 -0000	1.1
  +++ RequestForwarder.java	21 Sep 2004 15:55:10 -0000	1.2
  @@ -41,11 +41,16 @@
   	}
   
   	public void run() {
  -		char[] buffer = new char[1];
  +		char[] buffer = new char[1024];
   		try {
   			int ret = 0;
  -			while ((ret = reader.read(buffer)) != -1) {
  -				String line = new String(buffer);
  +			while ((ret = reader.read(buffer, 0, 1023)) != -1) {
  +				String line = new String(buffer, 0, ret);
  +				if(line.equalsIgnoreCase("STOPTCPM")) {
  +					System.err.println("*** RECEIVED STOP COMMAND. Stopping ***");
  +					break;
  +				}
  +
   				// give the incoming line to the handler
   				requestHandler.incomingRequestLine(line);
   
  @@ -66,4 +71,4 @@
   		}
   		requestHandler.close();
   	}
  -}
  \ No newline at end of file
  +}