hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r534770 - /jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java
Date Thu, 03 May 2007 09:52:07 GMT
Author: olegk
Date: Thu May  3 02:52:06 2007
New Revision: 534770

URL: http://svn.apache.org/viewvc?view=rev&rev=534770
Log:
Added #copy() method

Modified:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java?view=diff&rev=534770&r1=534769&r2=534770
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/BasicHttpProcessor.java
Thu May  3 02:52:06 2007
@@ -223,4 +223,20 @@
         }
     }
     
+    /**
+     * Creates a copy of this instance
+     * 
+     * @return new instance of the BasicHttpProcessor
+     */
+    public BasicHttpProcessor copy() {
+        BasicHttpProcessor clone = new BasicHttpProcessor();
+        if (this.requestInterceptors != null) {
+            clone.requestInterceptors = new ArrayList(this.requestInterceptors);
+        }
+        if (this.responseInterceptors != null) {
+            clone.responseInterceptors = new ArrayList(this.responseInterceptors);
+        }
+        return clone;
+    }
+    
 }



Mime
View raw message