hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r640959 - in /httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http: client/ClientRequestDirector.java impl/client/AbstractHttpClient.java impl/client/DefaultClientRequestDirector.java
Date Tue, 25 Mar 2008 19:49:36 GMT
Author: olegk
Date: Tue Mar 25 12:49:35 2008
New Revision: 640959

URL: http://svn.apache.org/viewvc?rev=640959&view=rev
Log:
Removed unused method from the ClientRequestDirector interface 

Modified:
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/ClientRequestDirector.java
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/ClientRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/ClientRequestDirector.java?rev=640959&r1=640958&r2=640959&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/ClientRequestDirector.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/ClientRequestDirector.java
Tue Mar 25 12:49:35 2008
@@ -38,9 +38,6 @@
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpException;
 import org.apache.http.protocol.HttpContext;
-import org.apache.http.conn.ManagedClientConnection;
-
-
 
 /**
  * A client-side request director.
@@ -97,21 +94,6 @@
     HttpResponse execute(HttpHost target, HttpRequest request,
                          HttpContext context)
         throws HttpException, IOException
-        ;
-
-
-    /**
-     * Obtains the connection to which the response is tied.
-     * Responses with a non-buffered response entity are tied to
-     * their connection until the entity is consumed or discarded.
-     * Until then, the connection must not be released. Afterwards,
-     * it must be released.
-     *
-     * @return  the connection to which the response from
-     *          {@link #execute execute} is tied, or
-     *          <code>null</code> if there is none
-     */
-    ManagedClientConnection getConnection()
         ;
 
 

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java?rev=640959&r1=640958&r2=640959&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java
Tue Mar 25 12:49:35 2008
@@ -57,6 +57,7 @@
 import org.apache.http.protocol.BasicHttpProcessor;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.BasicHttpContext;
+import org.apache.http.protocol.HttpProcessor;
 
 /**
  * Convenience base class for HTTP client implementations.
@@ -485,7 +486,7 @@
                 context = new BasicHttpContext(getDefaultContext());
             }
             // Create a director for this request
-            director = new DefaultClientRequestDirector(
+            director = createClientRequestDirector(
                     getConnectionManager(),
                     getConnectionReuseStrategy(),
                     getRoutePlanner(),
@@ -508,6 +509,28 @@
 
     } // execute
 
+    
+    protected ClientRequestDirector createClientRequestDirector(
+            final ClientConnectionManager conman,
+            final ConnectionReuseStrategy reustrat,
+            final HttpRoutePlanner rouplan,
+            final HttpProcessor httpProcessor,
+            final HttpRequestRetryHandler retryHandler,
+            final RedirectHandler redirectHandler,
+            final AuthenticationHandler targetAuthHandler,
+            final AuthenticationHandler proxyAuthHandler,
+            final HttpParams params) {
+        return new DefaultClientRequestDirector(
+                conman,
+                reustrat,
+                rouplan,
+                httpProcessor,
+                retryHandler,
+                redirectHandler,
+                targetAuthHandler,
+                proxyAuthHandler,
+                params);
+    }
 
     /**
      * Obtains parameters for executing a request.

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java?rev=640959&r1=640958&r2=640959&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
Tue Mar 25 12:49:35 2008
@@ -214,12 +214,6 @@
     } // constructor
 
 
-    // non-javadoc, see interface ClientRequestDirector
-    public ManagedClientConnection getConnection() {
-        return managedConn;
-    }
-
-    
     private RequestWrapper wrapRequest(
             final HttpRequest request) throws ProtocolException {
         try {



Mime
View raw message