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
This commit is contained in:
Roland Weber 2008-01-20 19:00:19 +00:00
parent dfffbc9a3c
commit bcc2848421
40 changed files with 121 additions and 54 deletions

View File

@ -1,6 +1,9 @@
Changes since 4.0 Alpha 2
-------------------
* [HTTPCLIENT-729] Move HttpRoute and related classes to routing package.
Contributed by Roland Weber <rolandw at apache.org>
* [HTTPCLIENT-725] Use TimeUnit arguments for timeouts in connection manager.
Contributed by Roland Weber <rolandw at apache.org>

View File

@ -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;

View File

@ -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;

View File

@ -36,6 +36,8 @@ import java.util.concurrent.TimeUnit;
import org.apache.http.params.HttpParams;
import org.apache.http.conn.routing.HttpRoute;
/**

View File

@ -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.

View File

@ -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;
/**

View File

@ -29,7 +29,7 @@
*
*/
package org.apache.http.conn;
package org.apache.http.conn.routing;

View File

@ -29,7 +29,7 @@
*
*/
package org.apache.http.conn;
package org.apache.http.conn.routing;
import java.net.InetAddress;

View File

@ -29,7 +29,7 @@
*
*/
package org.apache.http.conn;
package org.apache.http.conn.routing;

View File

@ -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;

View File

@ -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;
/**

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;
/**

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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}.

View File

@ -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;

View File

@ -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());

View File

@ -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;
/**

View File

@ -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
* <http://www.apache.org/>.
*
*/
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);
}
}

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;