You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2012/06/18 18:20:16 UTC

svn commit: r1351401 - /httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/

Author: olegk
Date: Mon Jun 18 16:20:16 2012
New Revision: 1351401

URL: http://svn.apache.org/viewvc?rev=1351401&view=rev
Log:
Manage resources associated with the response through a wrapper class

Added:
    httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpResponseWrapper.java   (with props)
Removed:
    httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/ManagedEntity.java
Modified:
    httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/BackoffStrategyFacade.java
    httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpClientRequestExecutor.java
    httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpRequestWrapper.java
    httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/MainRequestExecutor.java
    httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/ProtocolFacade.java
    httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/RedirectFacade.java
    httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/RetryFacade.java

Modified: httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/BackoffStrategyFacade.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/BackoffStrategyFacade.java?rev=1351401&r1=1351400&r2=1351401&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/BackoffStrategyFacade.java (original)
+++ httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/BackoffStrategyFacade.java Mon Jun 18 16:20:16 2012
@@ -31,7 +31,6 @@ import java.io.IOException;
 import java.lang.reflect.UndeclaredThrowableException;
 
 import org.apache.http.HttpException;
-import org.apache.http.HttpResponse;
 import org.apache.http.annotation.ThreadSafe;
 import org.apache.http.client.BackoffManager;
 import org.apache.http.client.ConnectionBackoffStrategy;
@@ -68,7 +67,7 @@ public class BackoffStrategyFacade imple
         this.backoffManager = backoffManager;
     }
 
-    public HttpResponse execute(
+    public HttpResponseWrapper execute(
             final HttpRoute route,
             final HttpRequestWrapper request,
             final HttpContext context,
@@ -82,18 +81,17 @@ public class BackoffStrategyFacade imple
         if (context == null) {
             throw new IllegalArgumentException("HTTP context may not be null");
         }
-        HttpResponse out;
+        HttpResponseWrapper out = null;
         try {
             out = this.requestExecutor.execute(route, request, context, execAware);
-        } catch (RuntimeException ex) {
-            if (this.connectionBackoffStrategy.shouldBackoff(ex)) {
-                this.backoffManager.backOff(route);
-            }
-            throw ex;
         } catch (Exception ex) {
+            if (out != null) {
+                out.close();
+            }
             if (this.connectionBackoffStrategy.shouldBackoff(ex)) {
                 this.backoffManager.backOff(route);
             }
+            if (ex instanceof RuntimeException) throw (RuntimeException) ex;
             if (ex instanceof HttpException) throw (HttpException) ex;
             if (ex instanceof IOException) throw (IOException) ex;
             throw new UndeclaredThrowableException(ex);

Modified: httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpClientRequestExecutor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpClientRequestExecutor.java?rev=1351401&r1=1351400&r2=1351401&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpClientRequestExecutor.java (original)
+++ httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpClientRequestExecutor.java Mon Jun 18 16:20:16 2012
@@ -30,19 +30,28 @@ package org.apache.http.impl.client.exec
 import java.io.IOException;
 
 import org.apache.http.HttpException;
-import org.apache.http.HttpResponse;
 import org.apache.http.client.methods.HttpExecutionAware;
 import org.apache.http.conn.routing.HttpRoute;
 import org.apache.http.protocol.HttpContext;
 
 /**
+ * This interface represents an element in the HTTP request execution chain. Each element can
+ * either be a decorator around another element that implements a cross cutting aspect or
+ * a self-contained executor capable of producing a response for the given request.
+ * <p/>
+ * Important: please note it is required for decorators that implement post execution aspects
+ * or response post-processing of any sort to release resources associated with the response
+ * by calling {@link HttpResponseWrapper#releaseConnection()} or {@link HttpResponseWrapper#close()}
+ * methods in case of an I/O, protocol or runtime exception, or in case the response is not
+ * propagated to the caller.
+ *
  * @since 4.3
  */
 public interface HttpClientRequestExecutor {
 
-    HttpResponse execute(
-            HttpRoute route, 
-            HttpRequestWrapper request, 
+    HttpResponseWrapper execute(
+            HttpRoute route,
+            HttpRequestWrapper request,
             HttpContext context,
             HttpExecutionAware execAware) throws IOException, HttpException;
 

Modified: httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpRequestWrapper.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpRequestWrapper.java?rev=1351401&r1=1351400&r2=1351401&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpRequestWrapper.java (original)
+++ httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpRequestWrapper.java Mon Jun 18 16:20:16 2012
@@ -51,9 +51,8 @@ import org.apache.http.params.HttpProtoc
 import org.apache.http.protocol.HTTP;
 
 /**
- * A wrapper class for {@link HttpRequest}s that can be used to change
- * properties of the current request without modifying the original
- * object.
+ * A wrapper class for {@link HttpRequest} that can be used to change properties of the current
+ * request without modifying the original object.
  *
  * @since 4.3
  */
@@ -67,7 +66,7 @@ public class HttpRequestWrapper extends 
     private ProtocolVersion version;
     private HttpHost virtualHost;
 
-    HttpRequestWrapper(
+    private HttpRequestWrapper(
             final ProtocolVersion version,
             final URI uri,
             final String method,
@@ -195,7 +194,7 @@ public class HttpRequestWrapper extends 
                 super.writeTo(outstream);
             }
         }
-        
+
     }
 
     public static HttpRequestWrapper wrap(final HttpRequest request) throws ProtocolException {

Added: httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpResponseWrapper.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpResponseWrapper.java?rev=1351401&view=auto
==============================================================================
--- httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpResponseWrapper.java (added)
+++ httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpResponseWrapper.java Mon Jun 18 16:20:16 2012
@@ -0,0 +1,292 @@
+/*
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.client.exec;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.SocketException;
+import java.util.Locale;
+
+import org.apache.http.Header;
+import org.apache.http.HeaderIterator;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.ProtocolVersion;
+import org.apache.http.StatusLine;
+import org.apache.http.annotation.NotThreadSafe;
+import org.apache.http.conn.ConnectionReleaseTrigger;
+import org.apache.http.conn.EofSensorInputStream;
+import org.apache.http.conn.EofSensorWatcher;
+import org.apache.http.conn.ManagedClientConnection;
+import org.apache.http.entity.HttpEntityWrapper;
+import org.apache.http.params.HttpParams;
+import org.apache.http.util.EntityUtils;
+
+/**
+ * A wrapper class for {@link HttpResponse}s that can be used to change
+ * properties of the current request without modifying the original
+ * object.
+ *
+ * @since 4.3
+ */
+@NotThreadSafe
+public class HttpResponseWrapper implements HttpResponse, ConnectionReleaseTrigger, Closeable {
+
+    private final HttpResponse original;
+    private HttpEntity entity;
+    private ManagedClientConnection conn;
+
+    private HttpResponseWrapper(final HttpResponse original, final ManagedClientConnection conn) {
+        super();
+        this.original = original;
+        this.conn = conn;
+        HttpEntity entity = original.getEntity();
+        if (conn != null && entity != null && entity.isStreaming()) {
+            this.entity = new EntityWrapper(entity);
+        }
+    }
+
+    public HttpResponse getOriginal() {
+        return this.original;
+    }
+
+    public ProtocolVersion getProtocolVersion() {
+        return this.original.getProtocolVersion();
+    }
+
+    public boolean containsHeader(final String name) {
+        return this.original.containsHeader(name);
+    }
+
+    public Header[] getHeaders(final String name) {
+        return this.original.getHeaders(name);
+    }
+
+    public Header getFirstHeader(final String name) {
+        return this.original.getFirstHeader(name);
+    }
+
+    public Header getLastHeader(final String name) {
+        return this.original.getLastHeader(name);
+    }
+
+    public Header[] getAllHeaders() {
+        return this.original.getAllHeaders();
+    }
+
+    public void addHeader(final Header header) {
+        this.original.addHeader(header);
+    }
+
+    public void addHeader(final String name, final String value) {
+        this.original.addHeader(name, value);
+    }
+
+    public void setHeader(final Header header) {
+        this.original.setHeader(header);
+    }
+
+    public void setHeader(String name, String value) {
+        this.original.setHeader(name, value);
+    }
+
+    public void setHeaders(final Header[] headers) {
+        this.original.setHeaders(headers);
+    }
+
+    public void removeHeader(final Header header) {
+        this.original.removeHeader(header);
+    }
+
+    public void removeHeaders(final String name) {
+        this.original.removeHeaders(name);
+    }
+
+    public HeaderIterator headerIterator() {
+        return this.original.headerIterator();
+    }
+
+    public HeaderIterator headerIterator(final String name) {
+        return this.original.headerIterator(name);
+    }
+
+    public HttpParams getParams() {
+        return this.original.getParams();
+    }
+
+    public void setParams(final HttpParams params) {
+        this.original.setParams(params);
+    }
+
+    public StatusLine getStatusLine() {
+        return this.original.getStatusLine();
+    }
+
+    public void setStatusLine(final StatusLine statusline) {
+        this.original.setStatusLine(statusline);
+    }
+
+    public void setStatusLine(final ProtocolVersion ver, int code) {
+        this.original.setStatusLine(ver, code);
+    }
+
+    public void setStatusLine(final ProtocolVersion ver, int code, final String reason) {
+        this.original.setStatusLine(ver, code, reason);
+    }
+
+    public void setStatusCode(int code) throws IllegalStateException {
+        this.original.setStatusCode(code);
+    }
+
+    public void setReasonPhrase(final String reason) throws IllegalStateException {
+        this.original.setReasonPhrase(reason);
+    }
+
+    public Locale getLocale() {
+        return this.original.getLocale();
+    }
+
+    public void setLocale(final Locale loc) {
+        this.original.setLocale(loc);
+    }
+
+    public HttpEntity getEntity() {
+        return this.entity;
+    }
+
+    public void setEntity(final HttpEntity entity) {
+        this.entity = entity;
+    }
+
+    private void cleanup() throws IOException {
+        if (this.conn != null) {
+            this.conn.abortConnection();
+            this.conn = null;
+        }
+    }
+
+    public void releaseConnection() throws IOException {
+        if (this.conn != null) {
+            try {
+                if (this.conn.isMarkedReusable()) {
+                    HttpEntity entity = this.original.getEntity();
+                    if (entity != null) {
+                        EntityUtils.consume(entity);
+                    }
+                }
+                this.conn.releaseConnection();
+                this.conn = null;
+            } finally {
+                cleanup();
+            }
+        }
+    }
+
+    public void abortConnection() throws IOException {
+        cleanup();
+    }
+
+    public void close() throws IOException {
+        cleanup();
+    }
+
+    class EntityWrapper extends HttpEntityWrapper implements EofSensorWatcher {
+
+        public EntityWrapper(final HttpEntity entity) {
+            super(entity);
+        }
+
+        @Override
+        public boolean isRepeatable() {
+            return false;
+        }
+
+        @Override
+        public InputStream getContent() throws IOException {
+            return new EofSensorInputStream(this.wrappedEntity.getContent(), this);
+        }
+
+        @Deprecated
+        @Override
+        public void consumeContent() throws IOException {
+            releaseConnection();
+        }
+
+        @Override
+        public void writeTo(final OutputStream outstream) throws IOException {
+            this.wrappedEntity.writeTo(outstream);
+            releaseConnection();
+        }
+
+        public boolean eofDetected(final InputStream wrapped) throws IOException {
+            try {
+                // there may be some cleanup required, such as
+                // reading trailers after the response body:
+                wrapped.close();
+                releaseConnection();
+            } finally {
+                cleanup();
+            }
+            return false;
+        }
+
+        public boolean streamClosed(InputStream wrapped) throws IOException {
+            try {
+                boolean open = conn != null && conn.isOpen();
+                // this assumes that closing the stream will
+                // consume the remainder of the response body:
+                try {
+                    wrapped.close();
+                    releaseConnection();
+                } catch (SocketException ex) {
+                    if (open) {
+                        throw ex;
+                    }
+                }
+            } finally {
+                cleanup();
+            }
+            return false;
+        }
+
+        public boolean streamAbort(InputStream wrapped) throws IOException {
+            cleanup();
+            return false;
+        }
+
+    }
+
+    public static HttpResponseWrapper wrap(
+            final HttpResponse response,
+            final ManagedClientConnection conn) {
+        return new HttpResponseWrapper(response, conn);
+    }
+
+}

Propchange: httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpResponseWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpResponseWrapper.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/HttpResponseWrapper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/MainRequestExecutor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/MainRequestExecutor.java?rev=1351401&r1=1351400&r2=1351401&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/MainRequestExecutor.java (original)
+++ httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/MainRequestExecutor.java Mon Jun 18 16:20:16 2012
@@ -168,7 +168,7 @@ public class MainRequestExecutor impleme
         this.params             = params;
     }
 
-    public HttpResponse execute(
+    public HttpResponseWrapper execute(
             final HttpRoute route,
             final HttpRequestWrapper request,
             final HttpContext context,
@@ -351,14 +351,10 @@ public class MainRequestExecutor impleme
                 } catch(IOException ex) {
                     this.log.debug("IOException releasing connection", ex);
                 }
+                return HttpResponseWrapper.wrap(response, null);
             } else {
-                // install an auto-release entity
-                entity = new ManagedEntity(entity, managedConn, execAware);
-                response.setEntity(entity);
+                return HttpResponseWrapper.wrap(response, managedConn);
             }
-
-            return response;
-
         } catch (ConnectionShutdownException ex) {
             InterruptedIOException ioex = new InterruptedIOException(
                     "Connection has been shut down");

Modified: httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/ProtocolFacade.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/ProtocolFacade.java?rev=1351401&r1=1351400&r2=1351401&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/ProtocolFacade.java (original)
+++ httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/ProtocolFacade.java Mon Jun 18 16:20:16 2012
@@ -35,7 +35,6 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.http.HttpException;
 import org.apache.http.HttpHost;
-import org.apache.http.HttpResponse;
 import org.apache.http.ProtocolException;
 import org.apache.http.annotation.ThreadSafe;
 import org.apache.http.auth.AuthState;
@@ -101,7 +100,7 @@ public class ProtocolFacade implements H
         }
     }
 
-    public HttpResponse execute(
+    public HttpResponseWrapper execute(
             final HttpRoute route,
             final HttpRequestWrapper request,
             final HttpContext context,
@@ -149,13 +148,22 @@ public class ProtocolFacade implements H
 
         this.httpProcessor.process(request, context);
 
-        HttpResponse response = this.requestExecutor.execute(route, request, context, execAware);
-
-        // Run response protocol interceptors
-        context.setAttribute(ExecutionContext.HTTP_RESPONSE, response);
-        this.httpProcessor.process(response, context);
-
-        return response;
+        HttpResponseWrapper response = this.requestExecutor.execute(route, request, context, execAware);
+        try {
+            // Run response protocol interceptors
+            context.setAttribute(ExecutionContext.HTTP_RESPONSE, response);
+            this.httpProcessor.process(response, context);
+            return response;
+        } catch (RuntimeException ex) {
+            response.close();
+            throw ex;
+        } catch (IOException ex) {
+            response.close();
+            throw ex;
+        } catch (HttpException ex) {
+            response.close();
+            throw ex;
+        }
     }
 
 }

Modified: httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/RedirectFacade.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/RedirectFacade.java?rev=1351401&r1=1351400&r2=1351401&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/RedirectFacade.java (original)
+++ httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/RedirectFacade.java Mon Jun 18 16:20:16 2012
@@ -35,7 +35,6 @@ import org.apache.commons.logging.LogFac
 import org.apache.http.HttpException;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
 import org.apache.http.ProtocolException;
 import org.apache.http.annotation.ThreadSafe;
 import org.apache.http.auth.AuthScheme;
@@ -50,7 +49,6 @@ import org.apache.http.conn.routing.Http
 import org.apache.http.conn.routing.HttpRoutePlanner;
 import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.HttpContext;
-import org.apache.http.util.EntityUtils;
 
 /**
  * The following parameters can be used to customize the behavior of this
@@ -91,7 +89,7 @@ public class RedirectFacade implements H
         this.redirectStrategy = redirectStrategy;
     }
 
-    public HttpResponse execute(
+    public HttpResponseWrapper execute(
             final HttpRoute route,
             final HttpRequestWrapper request,
             final HttpContext context,
@@ -110,7 +108,7 @@ public class RedirectFacade implements H
         HttpRoute currentRoute = route;
         HttpRequestWrapper currentRequest = request;
         for (int redirectCount = 0;;) {
-            HttpResponse response = requestExecutor.execute(
+            HttpResponseWrapper response = requestExecutor.execute(
                     currentRoute, currentRequest, context, execAware);
             try {
                 if (HttpClientParams.isRedirecting(params) &&
@@ -159,15 +157,23 @@ public class RedirectFacade implements H
                     if (this.log.isDebugEnabled()) {
                         this.log.debug("Redirecting to '" + uri + "' via " + currentRoute);
                     }
-                    EntityUtils.consume(response.getEntity());
+                    response.releaseConnection();
                 } else {
                     return response;
                 }
+            } catch (RuntimeException ex) {
+                response.close();
+                throw ex;
+            } catch (IOException ex) {
+                response.close();
+                throw ex;
             } catch (HttpException ex) {
+                // Protocol exception related to a direct.
+                // The underlying connection may still be salvaged.
                 try {
-                    EntityUtils.consume(response.getEntity());
+                    response.releaseConnection();
                 } catch (IOException ioex) {
-                    this.log.warn(ex.getMessage(), ioex);
+                    this.log.debug("I/O error while releasing connection", ioex);
                 }
                 throw ex;
             }

Modified: httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/RetryFacade.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/RetryFacade.java?rev=1351401&r1=1351400&r2=1351401&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/RetryFacade.java (original)
+++ httpcomponents/httpclient/branches/decorator-refactoring/httpclient/src/main/java/org/apache/http/impl/client/exec/RetryFacade.java Mon Jun 18 16:20:16 2012
@@ -34,7 +34,6 @@ import org.apache.commons.logging.LogFac
 import org.apache.http.Header;
 import org.apache.http.HttpException;
 import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
 import org.apache.http.annotation.NotThreadSafe;
 import org.apache.http.client.HttpRequestRetryHandler;
 import org.apache.http.client.NonRepeatableRequestException;
@@ -67,7 +66,7 @@ public class RetryFacade implements Http
         this.retryHandler = retryHandler;
     }
 
-    public HttpResponse execute(
+    public HttpResponseWrapper execute(
             final HttpRoute route,
             final HttpRequestWrapper request,
             final HttpContext context,