hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r645846 - in /httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client: DefaultClientRequestDirector.java RoutedRequest.java
Date Tue, 08 Apr 2008 10:53:45 GMT
Author: olegk
Date: Tue Apr  8 03:53:39 2008
New Revision: 645846

URL: http://svn.apache.org/viewvc?rev=645846&view=rev
Log:
Made RoutedRequest a simple class

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

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=645846&r1=645845&r2=645846&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 Apr  8 03:53:39 2008
@@ -264,7 +264,7 @@
         origWrapper.setParams(params);
         HttpRoute origRoute = determineRoute(target, origWrapper, context);
 
-        RoutedRequest roureq = new RoutedRequest.Impl(origWrapper, origRoute); 
+        RoutedRequest roureq = new RoutedRequest(origWrapper, origRoute); 
 
         long timeout = HttpClientParams.getConnectionManagerTimeout(params);
         
@@ -822,7 +822,7 @@
             wrapper.setParams(params);
             
             HttpRoute newRoute = determineRoute(newTarget, wrapper, context);
-            RoutedRequest newRequest = new RoutedRequest.Impl(wrapper, newRoute);
+            RoutedRequest newRequest = new RoutedRequest(wrapper, newRoute);
             
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Redirecting to '" + uri + "' via " + newRoute);

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/RoutedRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/RoutedRequest.java?rev=645846&r1=645845&r2=645846&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/RoutedRequest.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/RoutedRequest.java
Tue Apr  8 03:53:39 2008
@@ -45,55 +45,29 @@
  *
  * @since 4.0
  */
-public interface RoutedRequest {
-
-    /**
-     * Obtains the request.
-     *
-     * @return the request
-     */
-    RequestWrapper getRequest()
-        ;
+public class RoutedRequest {
 
+    protected final RequestWrapper request;
+    protected final HttpRoute route;
 
     /**
-     * Obtains the route.
+     * Creates a new routed request.
      *
-     * @return the route
+     * @param req   the request
+     * @param route   the route
      */
-    HttpRoute getRoute()
-        ;
-
-
-    /**
-     * Trivial default implementation of a routed request.
-     */
-    public static class Impl implements RoutedRequest {
-
-        protected final RequestWrapper request;
-        protected final HttpRoute route;
-
-        /**
-         * Creates a new routed request.
-         *
-         * @param req   the request
-         * @param rou   the route
-         */
-        public Impl(RequestWrapper req, HttpRoute rou) {
-            this.request = req;
-            this.route   = rou;
-        }
-
-        // non-javadoc, see interface
-        public final RequestWrapper getRequest() {
-            return request;
-        }
-
-        // non-javadoc, see interface
-        public final HttpRoute getRoute() {
-            return route;
-        }
-    } // class Impl
-
+    public RoutedRequest(final RequestWrapper req, final HttpRoute route) {
+        super();
+        this.request = req;
+        this.route   = route;
+    }
+
+    public final RequestWrapper getRequest() {
+        return request;
+    }
+
+    public final HttpRoute getRoute() {
+        return route;
+    }
 
 } // interface RoutedRequest



Mime
View raw message