this.name = name;
try {
QueuedThreadPool threadPool = new QueuedThreadPool(config.getMaxThreads(), config.getMinThreads());
threadPool.setName("http-client-" + name);
threadPool.setDaemon(true);
threadPool.start();
threadPool.setStopTimeout(2000);
executor = threadPool;
scheduler = new ScheduledExecutorScheduler("http-client-" + name + "-scheduler", true);
scheduler.start();