Issue #132 - ClientConnector abstraction.

Added name to default executor and scheduler after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2019-01-18 08:48:27 +01:00
parent 6c4ee083be
commit 32a6d83739
1 changed files with 6 additions and 2 deletions

View File

@ -167,9 +167,13 @@ public class ClientConnector extends ContainerLifeCycle
protected void doStart() throws Exception
{
if (executor == null)
setExecutor(new QueuedThreadPool());
{
QueuedThreadPool clientThreads = new QueuedThreadPool();
clientThreads.setName(String.format("client-pool@%x", hashCode()));
setExecutor(clientThreads);
}
if (scheduler == null)
setScheduler(new ScheduledExecutorScheduler());
setScheduler(new ScheduledExecutorScheduler(String.format("client-scheduler@%x", hashCode()), false));
if (byteBufferPool == null)
setByteBufferPool(new MappedByteBufferPool());
if (sslContextFactory == null)