inputStreamConnector.setFrameSender(frameSender);
inputStreamConnector.setConnectorStateCallback(connectionRemoverCallback);
inputStreamConnector.setName("Inputconnector-" + connectionId);
// TODO(rayc) Create a pool of connectors instead of making a new instance each time.
final OutputStreamConnector outputStreamConnector =
injector.getInstance(OutputStreamConnector.class);
outputStreamConnector.setConnectionId(connectionId);
outputStreamConnector.setOutputStream(socket.getOutputStream());
outputStreamConnector.setConnectorStateCallback(connectionRemoverCallback);
outputStreamConnector.setName("Outputconnector-" + connectionId);
outputQueueMap.put(connectionId, outputStreamConnector.getQueue());
// Start threads
threadPoolExecutor.execute(inputStreamConnector);
threadPoolExecutor.execute(outputStreamConnector);
LOG.debug("active thread count = " + Thread.activeCount());