hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r179410 - in /jakarta/httpclient/trunk/http-common/src: examples/org/apache/http/examples/ java/org/apache/http/ java/org/apache/http/impl/
Date Wed, 01 Jun 2005 19:59:30 GMT
Author: olegk
Date: Wed Jun  1 12:59:30 2005
New Revision: 179410

URL: http://svn.apache.org/viewcvs?rev=179410&view=rev
Log:
(1) Added HttpRequestFactory, HttpResponseFactory interfaces and their default impls
(2) Added methods to inject HttpRequestFactory & HttpResponseFactory dependencies to DefaultHttpClientConnection
& DefaultHttpServerConnection

Added:
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpRequestFactory.java
      - copied, changed from r179193, jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/HttpRequestFactory.java
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpResponseFactory.java
      - copied, changed from r179193, jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/HttpResponseFactory.java
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpRequestFactory.java
  (with props)
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpResponseFactory.java
  (with props)
Removed:
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/HttpRequestFactory.java
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/HttpResponseFactory.java
Modified:
    jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpGet.java
    jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpPost.java
    jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/HttpRequestExecutorDemo.java
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpServerConnection.java

Modified: jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpGet.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpGet.java?rev=179410&r1=179409&r2=179410&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpGet.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpGet.java
Wed Jun  1 12:59:30 2005
@@ -33,10 +33,15 @@
 import org.apache.http.HttpClientConnection;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpResponse;
+import org.apache.http.HttpRuntime;
+import org.apache.http.Protocol;
 import org.apache.http.entity.EntityConsumer;
 import org.apache.http.impl.DefaultHttpClientConnection;
 import org.apache.http.impl.DefaultHttpParams;
 import org.apache.http.impl.HttpGetRequest;
+import org.apache.http.impl.io.NIOSocketFactory;
+import org.apache.http.impl.io.OldIOSocketFactory;
+import org.apache.http.io.SocketFactory;
 import org.apache.http.params.HttpParams;
 
 /**
@@ -49,6 +54,14 @@
 public class ElementalHttpGet {
 
     public static void main(String[] args) throws Exception {
+        
+        SocketFactory socketfactory = null;
+        if (HttpRuntime.isNIOCapable()) {
+            socketfactory = NIOSocketFactory.getSocketFactory();
+        } else {
+            socketfactory = OldIOSocketFactory.getSocketFactory();
+        }
+        Protocol.registerProtocol("http", new Protocol("http", socketfactory, 80));
         
         HttpParams connparams = new DefaultHttpParams(null);
         HttpHost host = new HttpHost("www.yahoo.com");

Modified: jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpPost.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpPost.java?rev=179410&r1=179409&r2=179410&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpPost.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/ElementalHttpPost.java
Wed Jun  1 12:59:30 2005
@@ -36,6 +36,8 @@
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpResponse;
+import org.apache.http.HttpRuntime;
+import org.apache.http.Protocol;
 import org.apache.http.entity.ByteArrayEntity;
 import org.apache.http.entity.EntityConsumer;
 import org.apache.http.entity.InputStreamEntity;
@@ -43,6 +45,9 @@
 import org.apache.http.impl.DefaultHttpClientConnection;
 import org.apache.http.impl.DefaultHttpParams;
 import org.apache.http.impl.HttpPostRequest;
+import org.apache.http.impl.io.NIOSocketFactory;
+import org.apache.http.impl.io.OldIOSocketFactory;
+import org.apache.http.io.SocketFactory;
 import org.apache.http.params.HttpParams;
 
 /**
@@ -56,6 +61,14 @@
 
     public static void main(String[] args) throws Exception {
         
+        SocketFactory socketfactory = null;
+        if (HttpRuntime.isNIOCapable()) {
+            socketfactory = NIOSocketFactory.getSocketFactory();
+        } else {
+            socketfactory = OldIOSocketFactory.getSocketFactory();
+        }
+        Protocol.registerProtocol("http", new Protocol("http", socketfactory, 80));
+
         HttpParams connparams = new DefaultHttpParams(null);
         HttpHost host = new HttpHost("localhost", 8080);
         HttpClientConnection conn = new DefaultHttpClientConnection(host);

Modified: jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/HttpRequestExecutorDemo.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/HttpRequestExecutorDemo.java?rev=179410&r1=179409&r2=179410&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/HttpRequestExecutorDemo.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/examples/org/apache/http/examples/HttpRequestExecutorDemo.java
Wed Jun  1 12:59:30 2005
@@ -32,17 +32,22 @@
 import org.apache.http.HttpClientConnection;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpResponse;
+import org.apache.http.HttpRuntime;
 import org.apache.http.HttpVersion;
+import org.apache.http.Protocol;
 import org.apache.http.entity.EntityConsumer;
 import org.apache.http.executor.HttpRequestExecutor;
 import org.apache.http.impl.DefaultHttpClientConnection;
 import org.apache.http.impl.DefaultHttpParams;
 import org.apache.http.impl.HttpGetRequest;
+import org.apache.http.impl.io.NIOSocketFactory;
+import org.apache.http.impl.io.OldIOSocketFactory;
 import org.apache.http.interceptor.RequestConnControl;
 import org.apache.http.interceptor.RequestContent;
 import org.apache.http.interceptor.RequestExpectContinue;
 import org.apache.http.interceptor.RequestTargetHost;
 import org.apache.http.interceptor.RequestUserAgent;
+import org.apache.http.io.SocketFactory;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpProtocolParams;
 
@@ -56,6 +61,14 @@
 public class HttpRequestExecutorDemo {
 
     public static void main(String[] args) throws Exception {
+        
+        SocketFactory socketfactory = null;
+        if (HttpRuntime.isNIOCapable()) {
+            socketfactory = NIOSocketFactory.getSocketFactory();
+        } else {
+            socketfactory = OldIOSocketFactory.getSocketFactory();
+        }
+        Protocol.registerProtocol("http", new Protocol("http", socketfactory, 80));
         
         HttpParams params = new DefaultHttpParams(null);
         

Copied: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpRequestFactory.java
(from r179193, jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/HttpRequestFactory.java)
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpRequestFactory.java?p2=jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpRequestFactory.java&p1=jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/HttpRequestFactory.java&r1=179193&r2=179410&rev=179410&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/HttpRequestFactory.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpRequestFactory.java
Wed Jun  1 12:59:30 2005
@@ -27,11 +27,7 @@
  *
  */
 
-package org.apache.http.impl;
-
-import org.apache.http.HttpMutableRequest;
-import org.apache.http.MethodNotSupportedException;
-import org.apache.http.RequestLine;
+package org.apache.http;
 
 /**
  * <p>
@@ -42,25 +38,9 @@
  * 
  * @since 4.0
  */
-public class HttpRequestFactory {
+public interface HttpRequestFactory {
     
-    private HttpRequestFactory() {
-        super();
-    }
-
-    public static HttpMutableRequest newHttpRequest(final RequestLine requestline)
-            throws MethodNotSupportedException {
-        if (requestline == null) {
-            throw new IllegalArgumentException("Request line may not be null");
-        }
-        String method = requestline.getMethod();
-        if ("GET".equalsIgnoreCase(method)) {
-            return new BasicHttpRequest(requestline); 
-        } else if ("POST".equalsIgnoreCase(method)) {
-            return new BasicHttpEntityEnclosingRequest(requestline); 
-        } else { 
-            throw new MethodNotSupportedException(method +  " method not supported");
-        }
-    }
+    HttpMutableRequest newHttpRequest(RequestLine requestline) 
+        throws MethodNotSupportedException;
     
 }

Copied: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpResponseFactory.java
(from r179193, jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/HttpResponseFactory.java)
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpResponseFactory.java?p2=jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpResponseFactory.java&p1=jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/HttpResponseFactory.java&r1=179193&r2=179410&rev=179410&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/HttpResponseFactory.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/HttpResponseFactory.java
Wed Jun  1 12:59:30 2005
@@ -27,13 +27,7 @@
  *
  */
 
-package org.apache.http.impl;
-
-import org.apache.http.HttpMutableResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.HttpVersion;
-import org.apache.http.MethodNotSupportedException;
-import org.apache.http.StatusLine;
+package org.apache.http;
 
 /**
  * <p>
@@ -44,26 +38,10 @@
  * 
  * @since 4.0
  */
-public class HttpResponseFactory {
+public interface HttpResponseFactory {
     
-    private HttpResponseFactory() {
-        super();
-    }
-
-    public static HttpMutableResponse newHttpResponse(final HttpVersion ver, final int status)
-            throws MethodNotSupportedException {
-        if (ver == null) {
-            throw new IllegalArgumentException("HTTP version may not be null");
-        }
-        StatusLine statusline = new StatusLine(ver, status, HttpStatus.getStatusText(status));

-        return new BasicHttpResponse(statusline); 
-    }
+    HttpMutableResponse newHttpResponse(HttpVersion ver, int status);
+    
+    HttpMutableResponse newHttpResponse(StatusLine statusline);
     
-    public static HttpMutableResponse newHttpResponse(final StatusLine statusline)
-            throws MethodNotSupportedException {
-        if (statusline == null) {
-            throw new IllegalArgumentException("Status line may not be null");
-        }
-        return new BasicHttpResponse(statusline); 
-    }
 }

Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpClientConnection.java?rev=179410&r1=179409&r2=179410&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
Wed Jun  1 12:59:30 2005
@@ -43,6 +43,7 @@
 import org.apache.http.HttpMutableResponse;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
+import org.apache.http.HttpResponseFactory;
 import org.apache.http.HttpStatus;
 import org.apache.http.HttpVersion;
 import org.apache.http.NoHttpResponseException;
@@ -75,6 +76,11 @@
     
     private final HttpHost targethost;
     private final InetAddress localAddress;
+
+    /*
+     * Dependent interfaces
+     */
+    private HttpResponseFactory responsefactory = null; 
     
     public DefaultHttpClientConnection(final HttpHost targethost, final InetAddress localAddress)
{
         super();
@@ -83,12 +89,20 @@
         }
         this.targethost = targethost;
         this.localAddress = localAddress;
+        this.responsefactory = new DefaultHttpResponseFactory();
     }
     
     public DefaultHttpClientConnection(final HttpHost targethost) {
         this(targethost, null);
     }
     
+    public void setResponseFactory(final HttpResponseFactory responsefactory) {
+        if (responsefactory == null) {
+            throw new IllegalArgumentException("Factory may not be null");
+        }
+        this.responsefactory = responsefactory;
+    }
+
     public void open(final HttpParams params) throws IOException {
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
@@ -265,7 +279,7 @@
         if (isWirelogEnabled()) {
             wirelog("<< " + s + "[\\r][\\n]");
         }
-        return HttpResponseFactory.newHttpResponse(statusline);
+        return this.responsefactory.newHttpResponse(statusline);
     }
 
     protected void readResponseHeaders(

Added: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpRequestFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpRequestFactory.java?rev=179410&view=auto
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpRequestFactory.java
(added)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpRequestFactory.java
Wed Jun  1 12:59:30 2005
@@ -0,0 +1,67 @@
+/*
+ * $HeadURL$
+ * $Revision$
+ * $Date$
+ *
+ * ====================================================================
+ *
+ *  Copyright 1999-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.http.impl;
+
+import org.apache.http.HttpMutableRequest;
+import org.apache.http.HttpRequestFactory;
+import org.apache.http.MethodNotSupportedException;
+import org.apache.http.RequestLine;
+
+/**
+ * <p>
+ * </p>
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
+ *
+ * @version $Revision$
+ * 
+ * @since 4.0
+ */
+public class DefaultHttpRequestFactory implements HttpRequestFactory {
+    
+    public DefaultHttpRequestFactory() {
+        super();
+    }
+
+    public HttpMutableRequest newHttpRequest(final RequestLine requestline)
+            throws MethodNotSupportedException {
+        if (requestline == null) {
+            throw new IllegalArgumentException("Request line may not be null");
+        }
+        String method = requestline.getMethod();
+        if ("GET".equalsIgnoreCase(method)) {
+            return new BasicHttpRequest(requestline); 
+        } else if ("POST".equalsIgnoreCase(method)) {
+            return new BasicHttpEntityEnclosingRequest(requestline); 
+        } else { 
+            throw new MethodNotSupportedException(method +  " method not supported");
+        }
+    }
+    
+}

Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpRequestFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpRequestFactory.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpRequestFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpRequestFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpResponseFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpResponseFactory.java?rev=179410&view=auto
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpResponseFactory.java
(added)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpResponseFactory.java
Wed Jun  1 12:59:30 2005
@@ -0,0 +1,67 @@
+/*
+ * $HeadURL$
+ * $Revision$
+ * $Date$
+ *
+ * ====================================================================
+ *
+ *  Copyright 1999-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.http.impl;
+
+import org.apache.http.HttpMutableResponse;
+import org.apache.http.HttpResponseFactory;
+import org.apache.http.HttpStatus;
+import org.apache.http.HttpVersion;
+import org.apache.http.StatusLine;
+
+/**
+ * <p>
+ * </p>
+ * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
+ *
+ * @version $Revision$
+ * 
+ * @since 4.0
+ */
+public class DefaultHttpResponseFactory implements HttpResponseFactory {
+    
+    public DefaultHttpResponseFactory() {
+        super();
+    }
+
+    public HttpMutableResponse newHttpResponse(final HttpVersion ver, final int status) {
+        if (ver == null) {
+            throw new IllegalArgumentException("HTTP version may not be null");
+        }
+        StatusLine statusline = new StatusLine(ver, status, HttpStatus.getStatusText(status));

+        return new BasicHttpResponse(statusline); 
+    }
+    
+    public HttpMutableResponse newHttpResponse(final StatusLine statusline) {
+        if (statusline == null) {
+            throw new IllegalArgumentException("Status line may not be null");
+        }
+        return new BasicHttpResponse(statusline); 
+    }
+}

Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpResponseFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpResponseFactory.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpResponseFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpResponseFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpServerConnection.java?rev=179410&r1=179409&r2=179410&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
Wed Jun  1 12:59:30 2005
@@ -40,7 +40,9 @@
 import org.apache.http.HttpMutableRequest;
 import org.apache.http.HttpMutableResponse;
 import org.apache.http.HttpRequest;
+import org.apache.http.HttpRequestFactory;
 import org.apache.http.HttpResponse;
+import org.apache.http.HttpResponseFactory;
 import org.apache.http.HttpServerConnection;
 import org.apache.http.HttpStatus;
 import org.apache.http.HttpVersion;
@@ -68,10 +70,32 @@
     private static final String EXPECT_DIRECTIVE = "Expect";
     private static final String EXPECT_CONTINUE = "100-Continue";
 
+    /*
+     * Dependent interfaces
+     */
+    private HttpRequestFactory requestfactory = null; 
+    private HttpResponseFactory responsefactory = null; 
+
     public DefaultHttpServerConnection() {
         super();
+        this.requestfactory = new DefaultHttpRequestFactory();
+        this.responsefactory = new DefaultHttpResponseFactory();
     }
     
+    public void setRequestFactory(final HttpRequestFactory requestfactory) {
+        if (requestfactory == null) {
+            throw new IllegalArgumentException("Factory may not be null");
+        }
+        this.requestfactory = requestfactory;
+    }
+
+    public void setResponseFactory(final HttpResponseFactory responsefactory) {
+        if (responsefactory == null) {
+            throw new IllegalArgumentException("Factory may not be null");
+        }
+        this.responsefactory = responsefactory;
+    }
+
     public void bind(final Socket socket, final HttpParams params) throws IOException {
         super.bind(socket, params);
     }
@@ -118,7 +142,7 @@
         if (isWirelogEnabled()) {
             wirelog(">> " + line + "[\\r][\\n]");
         }
-        HttpMutableRequest request = HttpRequestFactory.newHttpRequest(requestline);
+        HttpMutableRequest request = this.requestfactory.newHttpRequest(requestline);
         request.setParams((HttpParams)params.clone());
         return request;
     }
@@ -146,8 +170,8 @@
     
     protected void sendContinue(final HttpVersion ver) 
             throws IOException, HttpException {
-        HttpMutableResponse response = 
-            HttpResponseFactory.newHttpResponse(ver, HttpStatus.SC_CONTINUE);
+        HttpMutableResponse response = this.responsefactory.newHttpResponse(
+                ver, HttpStatus.SC_CONTINUE);
         sendResponse(response);
     }
 



Mime
View raw message