hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r358076 - in /jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl: DefaultHttpClientConnection.java DefaultHttpServerConnection.java
Date Tue, 20 Dec 2005 19:14:41 GMT
Author: olegk
Date: Tue Dec 20 11:13:42 2005
New Revision: 358076

URL: http://svn.apache.org/viewcvs?rev=358076&view=rev
Log:
Added method to inject EntityGenerator and EntityWriter implementations

Modified:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java?rev=358076&r1=358075&r2=358076&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
Tue Dec 20 11:13:42 2005
@@ -107,6 +107,20 @@
         this.responsefactory = responsefactory;
     }
 
+    public void setEntityGenerator(final EntityGenerator entitygen) {
+        if (entitygen == null) {
+            throw new IllegalArgumentException("Entity generator may not be null");
+        }
+        this.entitygen = entitygen;
+    }
+
+    public void setEntityWriter(final EntityWriter entitywriter) {
+        if (entitywriter == null) {
+            throw new IllegalArgumentException("Entity writer may not be null");
+        }
+        this.entitywriter = entitywriter;
+    }
+
     public void open(final HttpParams params) throws IOException {
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java?rev=358076&r1=358075&r2=358076&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
Tue Dec 20 11:13:42 2005
@@ -87,6 +87,20 @@
         this.requestfactory = requestfactory;
     }
 
+    public void setEntityGenerator(final EntityGenerator entitygen) {
+        if (entitygen == null) {
+            throw new IllegalArgumentException("Entity generator may not be null");
+        }
+        this.entitygen = entitygen;
+    }
+
+    public void setEntityWriter(final EntityWriter entitywriter) {
+        if (entitywriter == null) {
+            throw new IllegalArgumentException("Entity writer may not be null");
+        }
+        this.entitywriter = entitywriter;
+    }
+
     public void bind(final Socket socket, final HttpParams params) throws IOException {
         super.bind(socket, params);
     }



Mime
View raw message