jetty-9: HTTP client: better names for the default thread pool and scheduler.

This commit is contained in:
Simone Bordet 2012-10-12 11:36:31 +02:00
parent 9d0828614f
commit 4ab9715c1b
1 changed files with 8 additions and 2 deletions

View File

@ -149,8 +149,14 @@ public class HttpClient extends ContainerLifeCycle
setDispatchIO(false);
}
String name = HttpClient.class.getSimpleName() + "@" + hashCode();
if (executor == null)
executor = new QueuedThreadPool();
{
QueuedThreadPool threadPool = new QueuedThreadPool();
threadPool.setName(name);
executor = threadPool;
}
addBean(executor);
if (byteBufferPool == null)
@ -158,7 +164,7 @@ public class HttpClient extends ContainerLifeCycle
addBean(byteBufferPool);
if (scheduler == null)
scheduler = new TimerScheduler(HttpClient.class.getSimpleName() + "@" + hashCode() + "-Scheduler");
scheduler = new TimerScheduler(name + "-scheduler");
addBean(scheduler);
selectorManager = newSelectorManager();