mirror of
https://github.com/jetty/jetty.project.git
synced 2025-02-28 19:09:10 +00:00
379194 - ProxyServlet enhancement to enable easy creation of alternative HttpClient implementations
Change-Id: I8246947afa7f3921150efef2040006e346cd0ca5
This commit is contained in:
parent
5687aa8beb
commit
af0a8e4aeb
@ -173,6 +173,16 @@ public class ProxyServlet implements Servlet
|
||||
return Log.getLogger("org.eclipse.jetty.servlets." + config.getServletName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and return an HttpClientInstance
|
||||
*
|
||||
* @return HttpClient
|
||||
*/
|
||||
protected HttpClient createHttpClientInstance()
|
||||
{
|
||||
return new HttpClient();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and return an HttpClient based on ServletConfig
|
||||
*
|
||||
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user