mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-01 03:19:13 +00:00
Merge "379194 - ProxyServlet enhancement to enable easy creation of alternative HttpClient implementations"
This commit is contained in:
commit
4ed88e71e0
@ -173,6 +173,16 @@ public class ProxyServlet implements Servlet
|
|||||||
return Log.getLogger("org.eclipse.jetty.servlets." + config.getServletName());
|
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
|
* Create and return an HttpClient based on ServletConfig
|
||||||
*
|
*
|
||||||
@ -185,7 +195,7 @@ public class ProxyServlet implements Servlet
|
|||||||
*/
|
*/
|
||||||
protected HttpClient createHttpClient(ServletConfig config) throws Exception
|
protected HttpClient createHttpClient(ServletConfig config) throws Exception
|
||||||
{
|
{
|
||||||
HttpClient client = new HttpClient();
|
HttpClient client = createHttpClientInstance();
|
||||||
client.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
|
client.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
|
||||||
|
|
||||||
String t = config.getInitParameter("maxThreads");
|
String t = config.getInitParameter("maxThreads");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user