commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oglu...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server HttpRequestHandlerChain.java
Date Mon, 24 Nov 2003 23:13:22 GMT
oglueck     2003/11/24 15:13:22

  Modified:    httpclient/src/test/org/apache/commons/httpclient/server
                        Tag: HTTPCLIENT_2_0_BRANCH
                        HttpRequestHandlerChain.java
  Log:
  Making this class thread-safe as it is accessed from different threads.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.3   +8 -8      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/HttpRequestHandlerChain.java
  
  Index: HttpRequestHandlerChain.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/HttpRequestHandlerChain.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- HttpRequestHandlerChain.java	24 Nov 2003 20:41:11 -0000	1.1.2.2
  +++ HttpRequestHandlerChain.java	24 Nov 2003 23:13:22 -0000	1.1.2.3
  @@ -84,22 +84,22 @@
       public HttpRequestHandlerChain() {
       }
       
  -    public void clear() {
  +    public synchronized void clear() {
           subhandlers.clear();
       }
  -    public void prependHandler(HttpRequestHandler handler) {
  +    public synchronized void prependHandler(HttpRequestHandler handler) {
           subhandlers.add(0,handler);
       }
  -    public void appendHandler(HttpRequestHandler handler) {
  +    public synchronized void appendHandler(HttpRequestHandler handler) {
           subhandlers.add(handler);
       }
   
  -    public boolean processRequest(SimpleHttpServerConnection conn)  throws IOException
{
  +    public synchronized boolean processRequest(SimpleHttpServerConnection conn)  throws
IOException {
           
           for(Iterator it=subhandlers.iterator();it.hasNext();) {
               HttpRequestHandler h = (HttpRequestHandler)it.next();
               boolean stop = h.processRequest(conn);
  -            if(stop) {
  +            if (stop) {
                   return true;
               }
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message