From bcc2848421255eb1b01cf69dbdb299d4a03ff9dc Mon Sep 17 00:00:00 2001 From: Roland Weber Date: Sun, 20 Jan 2008 19:00:19 +0000 Subject: [PATCH] HTTPCLIENT-729: moved HttpRoute and friends to conn.routing git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@613654 13f79535-47bb-0310-9956-ffa450edef68 --- RELEASE_NOTES.txt | 3 + .../examples/conn/ManagerConnectDirect.java | 2 +- .../examples/conn/ManagerConnectProxy.java | 2 +- .../http/conn/ClientConnectionManager.java | 2 + .../http/conn/ManagedClientConnection.java | 3 + .../params/HttpConnectionManagerParams.java | 2 +- .../{ => routing}/BasicRouteDirector.java | 2 +- .../http/conn/{ => routing}/HttpRoute.java | 2 +- .../conn/{ => routing}/HttpRouteDirector.java | 2 +- .../conn/{ => routing}/HttpRoutePlanner.java | 2 +- .../http/conn/{ => routing}/RouteTracker.java | 6 +- .../http/impl/client/AbstractHttpClient.java | 2 +- .../client/DefaultClientRequestDirector.java | 10 ++-- .../http/impl/client/DefaultHttpClient.java | 2 +- .../http/impl/client/RoutedRequest.java | 2 +- .../http/impl/conn/AbstractPoolEntry.java | 4 +- .../impl/conn/AbstractPooledConnAdapter.java | 2 +- .../impl/conn/DefaultHttpRoutePlanner.java | 6 +- .../impl/conn/ProxySelectorRoutePlanner.java | 6 +- .../impl/conn/SingleClientConnManager.java | 2 +- .../impl/conn/tsccm/AbstractConnPool.java | 2 +- .../http/impl/conn/tsccm/BasicPoolEntry.java | 2 +- .../impl/conn/tsccm/BasicPoolEntryRef.java | 2 +- .../http/impl/conn/tsccm/ConnPoolByRoute.java | 2 +- .../impl/conn/tsccm/RouteSpecificPool.java | 3 +- .../tsccm/ThreadSafeClientConnManager.java | 2 +- .../org/apache/http/conn/TestAllConn.java | 5 +- .../java/org/apache/http/conn/TestParams.java | 1 + .../http/conn/routing/TestAllRouting.java | 58 +++++++++++++++++++ .../conn/{ => routing}/TestHttpRoute.java | 6 +- .../conn/{ => routing}/TestRouteDirector.java | 6 +- .../conn/{ => routing}/TestRouteTracker.java | 6 +- .../impl/conn/ClientConnAdapterMockup.java | 2 +- .../apache/http/impl/conn/ExecReqThread.java | 2 +- .../apache/http/impl/conn/GetConnThread.java | 2 +- .../http/impl/conn/TestTSCCMNoServer.java | 2 +- .../http/impl/conn/TestTSCCMWithServer.java | 2 +- .../http/impl/conn/tsccm/TestDumbHelpers.java | 2 +- .../impl/conn/tsccm/TestWaitingThread.java | 2 +- .../http/localserver/ServerTestBase.java | 2 +- 40 files changed, 121 insertions(+), 54 deletions(-) rename module-client/src/main/java/org/apache/http/conn/{ => routing}/BasicRouteDirector.java (99%) rename module-client/src/main/java/org/apache/http/conn/{ => routing}/HttpRoute.java (99%) rename module-client/src/main/java/org/apache/http/conn/{ => routing}/HttpRouteDirector.java (98%) rename module-client/src/main/java/org/apache/http/conn/{ => routing}/HttpRoutePlanner.java (98%) rename module-client/src/main/java/org/apache/http/conn/{ => routing}/RouteTracker.java (98%) create mode 100644 module-client/src/test/java/org/apache/http/conn/routing/TestAllRouting.java rename module-client/src/test/java/org/apache/http/conn/{ => routing}/TestHttpRoute.java (99%) rename module-client/src/test/java/org/apache/http/conn/{ => routing}/TestRouteDirector.java (99%) rename module-client/src/test/java/org/apache/http/conn/{ => routing}/TestRouteTracker.java (99%) diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index fba783eea..b99295d9e 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -1,6 +1,9 @@ Changes since 4.0 Alpha 2 ------------------- +* [HTTPCLIENT-729] Move HttpRoute and related classes to routing package. + Contributed by Roland Weber + * [HTTPCLIENT-725] Use TimeUnit arguments for timeouts in connection manager. Contributed by Roland Weber diff --git a/module-client/src/examples/org/apache/http/examples/conn/ManagerConnectDirect.java b/module-client/src/examples/org/apache/http/examples/conn/ManagerConnectDirect.java index 814f6c188..c9fab9cba 100644 --- a/module-client/src/examples/org/apache/http/examples/conn/ManagerConnectDirect.java +++ b/module-client/src/examples/org/apache/http/examples/conn/ManagerConnectDirect.java @@ -38,7 +38,7 @@ import org.apache.http.HttpRequest; import org.apache.http.HttpResponse; import org.apache.http.HttpVersion; import org.apache.http.conn.ClientConnectionManager; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.ManagedClientConnection; import org.apache.http.conn.PlainSocketFactory; import org.apache.http.conn.Scheme; diff --git a/module-client/src/examples/org/apache/http/examples/conn/ManagerConnectProxy.java b/module-client/src/examples/org/apache/http/examples/conn/ManagerConnectProxy.java index 36bfe2643..bff27832d 100644 --- a/module-client/src/examples/org/apache/http/examples/conn/ManagerConnectProxy.java +++ b/module-client/src/examples/org/apache/http/examples/conn/ManagerConnectProxy.java @@ -38,7 +38,7 @@ import org.apache.http.HttpRequest; import org.apache.http.HttpResponse; import org.apache.http.HttpVersion; import org.apache.http.conn.ClientConnectionManager; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.ManagedClientConnection; import org.apache.http.conn.PlainSocketFactory; import org.apache.http.conn.Scheme; diff --git a/module-client/src/main/java/org/apache/http/conn/ClientConnectionManager.java b/module-client/src/main/java/org/apache/http/conn/ClientConnectionManager.java index 5f1b0d3e9..beb2ed421 100644 --- a/module-client/src/main/java/org/apache/http/conn/ClientConnectionManager.java +++ b/module-client/src/main/java/org/apache/http/conn/ClientConnectionManager.java @@ -36,6 +36,8 @@ import java.util.concurrent.TimeUnit; import org.apache.http.params.HttpParams; +import org.apache.http.conn.routing.HttpRoute; + /** diff --git a/module-client/src/main/java/org/apache/http/conn/ManagedClientConnection.java b/module-client/src/main/java/org/apache/http/conn/ManagedClientConnection.java index 6c2f40c87..8f526e65f 100644 --- a/module-client/src/main/java/org/apache/http/conn/ManagedClientConnection.java +++ b/module-client/src/main/java/org/apache/http/conn/ManagedClientConnection.java @@ -40,6 +40,9 @@ import org.apache.http.HttpHost; import org.apache.http.params.HttpParams; import org.apache.http.protocol.HttpContext; +import org.apache.http.conn.routing.HttpRoute; + + /** * A client-side connection with advanced connection logic. diff --git a/module-client/src/main/java/org/apache/http/conn/params/HttpConnectionManagerParams.java b/module-client/src/main/java/org/apache/http/conn/params/HttpConnectionManagerParams.java index 27a4974b8..ac56eaa69 100644 --- a/module-client/src/main/java/org/apache/http/conn/params/HttpConnectionManagerParams.java +++ b/module-client/src/main/java/org/apache/http/conn/params/HttpConnectionManagerParams.java @@ -33,7 +33,7 @@ package org.apache.http.conn.params; import java.util.HashMap; import java.util.Map; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.params.HttpParams; /** diff --git a/module-client/src/main/java/org/apache/http/conn/BasicRouteDirector.java b/module-client/src/main/java/org/apache/http/conn/routing/BasicRouteDirector.java similarity index 99% rename from module-client/src/main/java/org/apache/http/conn/BasicRouteDirector.java rename to module-client/src/main/java/org/apache/http/conn/routing/BasicRouteDirector.java index 8f33f9f5d..407387e86 100644 --- a/module-client/src/main/java/org/apache/http/conn/BasicRouteDirector.java +++ b/module-client/src/main/java/org/apache/http/conn/routing/BasicRouteDirector.java @@ -29,7 +29,7 @@ * */ -package org.apache.http.conn; +package org.apache.http.conn.routing; diff --git a/module-client/src/main/java/org/apache/http/conn/HttpRoute.java b/module-client/src/main/java/org/apache/http/conn/routing/HttpRoute.java similarity index 99% rename from module-client/src/main/java/org/apache/http/conn/HttpRoute.java rename to module-client/src/main/java/org/apache/http/conn/routing/HttpRoute.java index fbffa7287..d550ea5f5 100644 --- a/module-client/src/main/java/org/apache/http/conn/HttpRoute.java +++ b/module-client/src/main/java/org/apache/http/conn/routing/HttpRoute.java @@ -29,7 +29,7 @@ * */ -package org.apache.http.conn; +package org.apache.http.conn.routing; import java.net.InetAddress; diff --git a/module-client/src/main/java/org/apache/http/conn/HttpRouteDirector.java b/module-client/src/main/java/org/apache/http/conn/routing/HttpRouteDirector.java similarity index 98% rename from module-client/src/main/java/org/apache/http/conn/HttpRouteDirector.java rename to module-client/src/main/java/org/apache/http/conn/routing/HttpRouteDirector.java index 0e867064d..edceca104 100644 --- a/module-client/src/main/java/org/apache/http/conn/HttpRouteDirector.java +++ b/module-client/src/main/java/org/apache/http/conn/routing/HttpRouteDirector.java @@ -29,7 +29,7 @@ * */ -package org.apache.http.conn; +package org.apache.http.conn.routing; diff --git a/module-client/src/main/java/org/apache/http/conn/HttpRoutePlanner.java b/module-client/src/main/java/org/apache/http/conn/routing/HttpRoutePlanner.java similarity index 98% rename from module-client/src/main/java/org/apache/http/conn/HttpRoutePlanner.java rename to module-client/src/main/java/org/apache/http/conn/routing/HttpRoutePlanner.java index 8b2d7abd3..8dbd1ee72 100644 --- a/module-client/src/main/java/org/apache/http/conn/HttpRoutePlanner.java +++ b/module-client/src/main/java/org/apache/http/conn/routing/HttpRoutePlanner.java @@ -29,7 +29,7 @@ * */ -package org.apache.http.conn; +package org.apache.http.conn.routing; import org.apache.http.HttpException; import org.apache.http.HttpHost; diff --git a/module-client/src/main/java/org/apache/http/conn/RouteTracker.java b/module-client/src/main/java/org/apache/http/conn/routing/RouteTracker.java similarity index 98% rename from module-client/src/main/java/org/apache/http/conn/RouteTracker.java rename to module-client/src/main/java/org/apache/http/conn/routing/RouteTracker.java index a24d466da..9de4d7b14 100644 --- a/module-client/src/main/java/org/apache/http/conn/RouteTracker.java +++ b/module-client/src/main/java/org/apache/http/conn/routing/RouteTracker.java @@ -29,14 +29,14 @@ * */ -package org.apache.http.conn; +package org.apache.http.conn.routing; import java.net.InetAddress; import org.apache.http.HttpHost; import org.apache.http.util.CharArrayBuffer; -import org.apache.http.conn.HttpRoute.TunnelType; -import org.apache.http.conn.HttpRoute.LayerType; +import org.apache.http.conn.routing.HttpRoute.TunnelType; +import org.apache.http.conn.routing.HttpRoute.LayerType; /** diff --git a/module-client/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java b/module-client/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java index 927fe699f..a2518dd9f 100644 --- a/module-client/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java +++ b/module-client/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java @@ -51,7 +51,7 @@ import org.apache.http.client.HttpRequestRetryHandler; import org.apache.http.client.RedirectHandler; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.conn.ClientConnectionManager; -import org.apache.http.conn.HttpRoutePlanner; +import org.apache.http.conn.routing.HttpRoutePlanner; import org.apache.http.cookie.CookieSpecRegistry; import org.apache.http.params.HttpParams; import org.apache.http.protocol.BasicHttpProcessor; diff --git a/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java b/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java index 27272c617..08643b6ad 100644 --- a/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java +++ b/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java @@ -69,12 +69,12 @@ import org.apache.http.client.protocol.ClientContext; import org.apache.http.conn.BasicManagedEntity; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.ConnectionPoolTimeoutException; -import org.apache.http.conn.HttpRoute; -import org.apache.http.conn.HttpRoutePlanner; -import org.apache.http.conn.ManagedClientConnection; -import org.apache.http.conn.HttpRouteDirector; -import org.apache.http.conn.BasicRouteDirector; +import org.apache.http.conn.routing.HttpRoute; +import org.apache.http.conn.routing.HttpRoutePlanner; +import org.apache.http.conn.routing.HttpRouteDirector; +import org.apache.http.conn.routing.BasicRouteDirector; import org.apache.http.conn.Scheme; +import org.apache.http.conn.ManagedClientConnection; import org.apache.http.entity.BufferedHttpEntity; import org.apache.http.message.BasicHttpRequest; import org.apache.http.params.HttpConnectionParams; diff --git a/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java b/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java index 725a3f51e..c3787f65e 100644 --- a/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java +++ b/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java @@ -50,7 +50,7 @@ import org.apache.http.client.protocol.RequestTargetAuthentication; import org.apache.http.client.protocol.ResponseProcessCookies; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.ClientConnectionManagerFactory; -import org.apache.http.conn.HttpRoutePlanner; +import org.apache.http.conn.routing.HttpRoutePlanner; import org.apache.http.conn.PlainSocketFactory; import org.apache.http.conn.Scheme; import org.apache.http.conn.SchemeRegistry; diff --git a/module-client/src/main/java/org/apache/http/impl/client/RoutedRequest.java b/module-client/src/main/java/org/apache/http/impl/client/RoutedRequest.java index 3a7135bb4..167d783d5 100644 --- a/module-client/src/main/java/org/apache/http/impl/client/RoutedRequest.java +++ b/module-client/src/main/java/org/apache/http/impl/client/RoutedRequest.java @@ -32,7 +32,7 @@ package org.apache.http.impl.client; import org.apache.http.HttpRequest; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; /** diff --git a/module-client/src/main/java/org/apache/http/impl/conn/AbstractPoolEntry.java b/module-client/src/main/java/org/apache/http/impl/conn/AbstractPoolEntry.java index 4348c82da..d10491fbc 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/AbstractPoolEntry.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/AbstractPoolEntry.java @@ -36,9 +36,9 @@ import java.io.IOException; import org.apache.http.HttpHost; import org.apache.http.params.HttpParams; import org.apache.http.protocol.HttpContext; +import org.apache.http.conn.routing.HttpRoute; +import org.apache.http.conn.routing.RouteTracker; import org.apache.http.conn.ClientConnectionOperator; -import org.apache.http.conn.HttpRoute; -import org.apache.http.conn.RouteTracker; import org.apache.http.conn.OperatedClientConnection; diff --git a/module-client/src/main/java/org/apache/http/impl/conn/AbstractPooledConnAdapter.java b/module-client/src/main/java/org/apache/http/impl/conn/AbstractPooledConnAdapter.java index bb6362354..a41b38435 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/AbstractPooledConnAdapter.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/AbstractPooledConnAdapter.java @@ -36,7 +36,7 @@ import java.io.IOException; import org.apache.http.HttpHost; import org.apache.http.params.HttpParams; import org.apache.http.protocol.HttpContext; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.ManagedClientConnection; import org.apache.http.conn.ClientConnectionManager; diff --git a/module-client/src/main/java/org/apache/http/impl/conn/DefaultHttpRoutePlanner.java b/module-client/src/main/java/org/apache/http/impl/conn/DefaultHttpRoutePlanner.java index 7e4d75034..c7175621b 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/DefaultHttpRoutePlanner.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/DefaultHttpRoutePlanner.java @@ -39,10 +39,10 @@ import org.apache.http.HttpHost; import org.apache.http.HttpRequest; import org.apache.http.protocol.HttpContext; -import org.apache.http.conn.ClientConnectionManager; -import org.apache.http.conn.HttpRoute; -import org.apache.http.conn.HttpRoutePlanner; import org.apache.http.conn.Scheme; +import org.apache.http.conn.routing.HttpRoute; +import org.apache.http.conn.routing.HttpRoutePlanner; +import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.params.ConnRoutePNames; diff --git a/module-client/src/main/java/org/apache/http/impl/conn/ProxySelectorRoutePlanner.java b/module-client/src/main/java/org/apache/http/impl/conn/ProxySelectorRoutePlanner.java index 9fad1c45f..7a3e4d554 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/ProxySelectorRoutePlanner.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/ProxySelectorRoutePlanner.java @@ -45,10 +45,10 @@ import org.apache.http.HttpHost; import org.apache.http.HttpRequest; import org.apache.http.protocol.HttpContext; -import org.apache.http.conn.ClientConnectionManager; -import org.apache.http.conn.HttpRoute; -import org.apache.http.conn.HttpRoutePlanner; +import org.apache.http.conn.routing.HttpRoute; +import org.apache.http.conn.routing.HttpRoutePlanner; import org.apache.http.conn.Scheme; +import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.params.ConnRoutePNames; diff --git a/module-client/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java b/module-client/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java index e2184fe20..1cb899543 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/SingleClientConnManager.java @@ -36,9 +36,9 @@ import java.util.concurrent.TimeUnit; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.ClientConnectionOperator; -import org.apache.http.conn.HttpRoute; import org.apache.http.conn.ManagedClientConnection; import org.apache.http.conn.OperatedClientConnection; import org.apache.http.conn.SchemeRegistry; diff --git a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java index 0d4d65f0e..e16e35bd1 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java @@ -43,10 +43,10 @@ import java.util.concurrent.locks.ReentrantLock; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.ClientConnectionOperator; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.ConnectionPoolTimeoutException; -import org.apache.http.conn.HttpRoute; import org.apache.http.conn.OperatedClientConnection; import org.apache.http.params.HttpParams; import org.apache.http.impl.conn.IdleConnectionHandler; diff --git a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java index 224cc2fd9..09f0d351b 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntry.java @@ -33,7 +33,7 @@ package org.apache.http.impl.conn.tsccm; import java.lang.ref.ReferenceQueue; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.OperatedClientConnection; import org.apache.http.conn.ClientConnectionOperator; import org.apache.http.impl.conn.AbstractPoolEntry; diff --git a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntryRef.java b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntryRef.java index 2c89614bc..e3391792e 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntryRef.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/BasicPoolEntryRef.java @@ -34,7 +34,7 @@ package org.apache.http.impl.conn.tsccm; import java.lang.ref.WeakReference; import java.lang.ref.ReferenceQueue; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; diff --git a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java index 337af756b..1732c5038 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ConnPoolByRoute.java @@ -41,10 +41,10 @@ import java.util.concurrent.TimeUnit; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.ClientConnectionOperator; import org.apache.http.conn.ConnectionPoolTimeoutException; -import org.apache.http.conn.HttpRoute; import org.apache.http.conn.params.HttpConnectionManagerParams; diff --git a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/RouteSpecificPool.java b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/RouteSpecificPool.java index 161f15538..57bf18b48 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/RouteSpecificPool.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/RouteSpecificPool.java @@ -33,7 +33,8 @@ package org.apache.http.impl.conn.tsccm; import java.util.Queue; import java.util.LinkedList; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; + /** * A connection sub-pool for a specific route, used by {@link ConnPoolByRoute}. diff --git a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java index 5dbad913a..0c25983e7 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java @@ -35,10 +35,10 @@ import java.util.concurrent.TimeUnit; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.ClientConnectionOperator; import org.apache.http.conn.ConnectionPoolTimeoutException; -import org.apache.http.conn.HttpRoute; import org.apache.http.conn.ManagedClientConnection; import org.apache.http.conn.OperatedClientConnection; import org.apache.http.conn.SchemeRegistry; diff --git a/module-client/src/test/java/org/apache/http/conn/TestAllConn.java b/module-client/src/test/java/org/apache/http/conn/TestAllConn.java index 61ef5a672..9b5588b9b 100644 --- a/module-client/src/test/java/org/apache/http/conn/TestAllConn.java +++ b/module-client/src/test/java/org/apache/http/conn/TestAllConn.java @@ -30,6 +30,7 @@ package org.apache.http.conn; +import org.apache.http.conn.routing.TestAllRouting; import org.apache.http.conn.ssl.TestAllSSL; import org.apache.http.conn.util.TestAllUtil; @@ -46,12 +47,10 @@ public class TestAllConn extends TestCase { public static Test suite() { TestSuite suite = new TestSuite(); - suite.addTest(TestHttpRoute.suite()); - suite.addTest(TestRouteDirector.suite()); - suite.addTest(TestRouteTracker.suite()); suite.addTest(TestScheme.suite()); suite.addTest(TestParams.suite()); suite.addTest(TestExceptions.suite()); + suite.addTest(TestAllRouting.suite()); suite.addTest(TestAllSSL.suite()); suite.addTest(TestAllUtil.suite()); diff --git a/module-client/src/test/java/org/apache/http/conn/TestParams.java b/module-client/src/test/java/org/apache/http/conn/TestParams.java index 54a569b8a..87f34c9a6 100644 --- a/module-client/src/test/java/org/apache/http/conn/TestParams.java +++ b/module-client/src/test/java/org/apache/http/conn/TestParams.java @@ -39,6 +39,7 @@ import org.apache.http.HttpHost; import org.apache.http.params.HttpParams; import org.apache.http.params.BasicHttpParams; import org.apache.http.conn.params.HttpConnectionManagerParams; +import org.apache.http.conn.routing.HttpRoute; /** diff --git a/module-client/src/test/java/org/apache/http/conn/routing/TestAllRouting.java b/module-client/src/test/java/org/apache/http/conn/routing/TestAllRouting.java new file mode 100644 index 000000000..6de07c766 --- /dev/null +++ b/module-client/src/test/java/org/apache/http/conn/routing/TestAllRouting.java @@ -0,0 +1,58 @@ +/* + * $HeadURL$ + * $Revision$ + * $Date$ + * ==================================================================== + * 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 + * . + * + */ + +package org.apache.http.conn.routing; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +public class TestAllRouting extends TestCase { + + public TestAllRouting(String testName) { + super(testName); + } + + public static Test suite() { + TestSuite suite = new TestSuite(); + + suite.addTest(TestHttpRoute.suite()); + suite.addTest(TestRouteDirector.suite()); + suite.addTest(TestRouteTracker.suite()); + + return suite; + } + + public static void main(String args[]) { + String[] testCaseName = { TestAllRouting.class.getName() }; + junit.textui.TestRunner.main(testCaseName); + } + +} diff --git a/module-client/src/test/java/org/apache/http/conn/TestHttpRoute.java b/module-client/src/test/java/org/apache/http/conn/routing/TestHttpRoute.java similarity index 99% rename from module-client/src/test/java/org/apache/http/conn/TestHttpRoute.java rename to module-client/src/test/java/org/apache/http/conn/routing/TestHttpRoute.java index 202934fbe..e59ed0e08 100644 --- a/module-client/src/test/java/org/apache/http/conn/TestHttpRoute.java +++ b/module-client/src/test/java/org/apache/http/conn/routing/TestHttpRoute.java @@ -28,7 +28,7 @@ * */ -package org.apache.http.conn; +package org.apache.http.conn.routing; import java.net.InetAddress; @@ -41,8 +41,8 @@ import junit.framework.TestCase; import junit.framework.TestSuite; import org.apache.http.HttpHost; -import org.apache.http.conn.HttpRoute.TunnelType; -import org.apache.http.conn.HttpRoute.LayerType; +import org.apache.http.conn.routing.HttpRoute.TunnelType; +import org.apache.http.conn.routing.HttpRoute.LayerType; /** diff --git a/module-client/src/test/java/org/apache/http/conn/TestRouteDirector.java b/module-client/src/test/java/org/apache/http/conn/routing/TestRouteDirector.java similarity index 99% rename from module-client/src/test/java/org/apache/http/conn/TestRouteDirector.java rename to module-client/src/test/java/org/apache/http/conn/routing/TestRouteDirector.java index f0cc0dd7e..73f8f4fbd 100644 --- a/module-client/src/test/java/org/apache/http/conn/TestRouteDirector.java +++ b/module-client/src/test/java/org/apache/http/conn/routing/TestRouteDirector.java @@ -28,7 +28,7 @@ * */ -package org.apache.http.conn; +package org.apache.http.conn.routing; import java.net.InetAddress; @@ -38,8 +38,8 @@ import junit.framework.TestCase; import junit.framework.TestSuite; import org.apache.http.HttpHost; -import org.apache.http.conn.HttpRoute.TunnelType; -import org.apache.http.conn.HttpRoute.LayerType; +import org.apache.http.conn.routing.HttpRoute.TunnelType; +import org.apache.http.conn.routing.HttpRoute.LayerType; /** diff --git a/module-client/src/test/java/org/apache/http/conn/TestRouteTracker.java b/module-client/src/test/java/org/apache/http/conn/routing/TestRouteTracker.java similarity index 99% rename from module-client/src/test/java/org/apache/http/conn/TestRouteTracker.java rename to module-client/src/test/java/org/apache/http/conn/routing/TestRouteTracker.java index edaec70f3..00fb70b3c 100644 --- a/module-client/src/test/java/org/apache/http/conn/TestRouteTracker.java +++ b/module-client/src/test/java/org/apache/http/conn/routing/TestRouteTracker.java @@ -28,7 +28,7 @@ * */ -package org.apache.http.conn; +package org.apache.http.conn.routing; import java.net.InetAddress; @@ -40,8 +40,8 @@ import junit.framework.TestCase; import junit.framework.TestSuite; import org.apache.http.HttpHost; -import org.apache.http.conn.HttpRoute.TunnelType; -import org.apache.http.conn.HttpRoute.LayerType; +import org.apache.http.conn.routing.HttpRoute.TunnelType; +import org.apache.http.conn.routing.HttpRoute.LayerType; /** diff --git a/module-client/src/test/java/org/apache/http/impl/conn/ClientConnAdapterMockup.java b/module-client/src/test/java/org/apache/http/impl/conn/ClientConnAdapterMockup.java index 115d26f1d..b31f4f14d 100644 --- a/module-client/src/test/java/org/apache/http/impl/conn/ClientConnAdapterMockup.java +++ b/module-client/src/test/java/org/apache/http/impl/conn/ClientConnAdapterMockup.java @@ -31,7 +31,7 @@ package org.apache.http.impl.conn; import org.apache.http.HttpHost; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.params.HttpParams; import org.apache.http.protocol.HttpContext; diff --git a/module-client/src/test/java/org/apache/http/impl/conn/ExecReqThread.java b/module-client/src/test/java/org/apache/http/impl/conn/ExecReqThread.java index 721abcacf..a6c4aa309 100644 --- a/module-client/src/test/java/org/apache/http/impl/conn/ExecReqThread.java +++ b/module-client/src/test/java/org/apache/http/impl/conn/ExecReqThread.java @@ -33,7 +33,7 @@ package org.apache.http.impl.conn; import org.apache.http.HttpRequest; import org.apache.http.HttpResponse; import org.apache.http.conn.ClientConnectionManager; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.params.HttpParams; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.ExecutionContext; diff --git a/module-client/src/test/java/org/apache/http/impl/conn/GetConnThread.java b/module-client/src/test/java/org/apache/http/impl/conn/GetConnThread.java index 8e51fbf94..d1976dcf0 100644 --- a/module-client/src/test/java/org/apache/http/impl/conn/GetConnThread.java +++ b/module-client/src/test/java/org/apache/http/impl/conn/GetConnThread.java @@ -33,7 +33,7 @@ package org.apache.http.impl.conn; import java.util.concurrent.TimeUnit; import org.apache.http.conn.ClientConnectionManager; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.ManagedClientConnection; diff --git a/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMNoServer.java b/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMNoServer.java index 5dc169919..bb9bbe0e0 100644 --- a/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMNoServer.java +++ b/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMNoServer.java @@ -39,7 +39,7 @@ import junit.framework.TestSuite; import org.apache.http.HttpHost; import org.apache.http.HttpVersion; import org.apache.http.conn.ConnectionPoolTimeoutException; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.ManagedClientConnection; import org.apache.http.conn.PlainSocketFactory; import org.apache.http.conn.Scheme; diff --git a/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java b/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java index 35303594c..d0baea37d 100644 --- a/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java +++ b/module-client/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java @@ -43,7 +43,7 @@ import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.HttpVersion; import org.apache.http.conn.ConnectionPoolTimeoutException; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.ManagedClientConnection; import org.apache.http.conn.SchemeRegistry; import org.apache.http.conn.params.HttpConnectionManagerParams; diff --git a/module-client/src/test/java/org/apache/http/impl/conn/tsccm/TestDumbHelpers.java b/module-client/src/test/java/org/apache/http/impl/conn/tsccm/TestDumbHelpers.java index 395e1d410..68755f262 100644 --- a/module-client/src/test/java/org/apache/http/impl/conn/tsccm/TestDumbHelpers.java +++ b/module-client/src/test/java/org/apache/http/impl/conn/tsccm/TestDumbHelpers.java @@ -43,7 +43,7 @@ import junit.framework.TestSuite; import org.apache.http.HttpHost; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.Scheme; import org.apache.http.conn.SchemeRegistry; import org.apache.http.conn.SocketFactory; diff --git a/module-client/src/test/java/org/apache/http/impl/conn/tsccm/TestWaitingThread.java b/module-client/src/test/java/org/apache/http/impl/conn/tsccm/TestWaitingThread.java index 9d286bc96..1e24be85a 100644 --- a/module-client/src/test/java/org/apache/http/impl/conn/tsccm/TestWaitingThread.java +++ b/module-client/src/test/java/org/apache/http/impl/conn/tsccm/TestWaitingThread.java @@ -39,7 +39,7 @@ import junit.framework.TestCase; import junit.framework.TestSuite; import org.apache.http.HttpHost; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; diff --git a/module-client/src/test/java/org/apache/http/localserver/ServerTestBase.java b/module-client/src/test/java/org/apache/http/localserver/ServerTestBase.java index 67e28e1e0..c0a00e463 100644 --- a/module-client/src/test/java/org/apache/http/localserver/ServerTestBase.java +++ b/module-client/src/test/java/org/apache/http/localserver/ServerTestBase.java @@ -36,7 +36,7 @@ import junit.framework.TestCase; import org.apache.http.HttpHost; import org.apache.http.HttpVersion; -import org.apache.http.conn.HttpRoute; +import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.PlainSocketFactory; import org.apache.http.conn.Scheme; import org.apache.http.conn.SchemeRegistry;