Created ConnectionManager to manage threads for connection.