aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgdad2012-05-10 21:58:33 (EDT)
committerpgdad2012-05-10 22:01:24 (EDT)
commitaf0a8e4aeb6a1d241a2f67370ba86b14d24c35d0 (patch)
tree07412fd5b74a10fd0bd93c186810ca31a69bb5e9
parent5687aa8beb51d2f347753cd9d9351c0d819664fb (diff)
downloadorg.eclipse.jetty.project-af0a8e4aeb6a1d241a2f67370ba86b14d24c35d0.zip
org.eclipse.jetty.project-af0a8e4aeb6a1d241a2f67370ba86b14d24c35d0.tar.gz
org.eclipse.jetty.project-af0a8e4aeb6a1d241a2f67370ba86b14d24c35d0.tar.bz2
379194 - ProxyServlet enhancement to enable easy creation of alternative HttpClient implementationsrefs/changes/34/5934/2
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/ProxyServlet.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/ProxyServlet.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/ProxyServlet.java
index afae2ab..7fa9718 100644
--- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/ProxyServlet.java
+++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/ProxyServlet.java
@@ -174,6 +174,16 @@ public class ProxyServlet implements Servlet
}
/**
+ * Create and return an HttpClientInstance
+ *
+ * @return HttpClient
+ */
+ protected HttpClient createHttpClientInstance()
+ {
+ return new HttpClient();
+ }
+
+ /**
* Create and return an HttpClient based on ServletConfig
*
* By default this implementation will create an instance of the
@@ -185,7 +195,7 @@ public class ProxyServlet implements Servlet
*/
protected HttpClient createHttpClient(ServletConfig config) throws Exception
{
- HttpClient client = new HttpClient();
+ HttpClient client = createHttpClientInstance();
client.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
String t = config.getInitParameter("maxThreads");