@Override
    public void run() {
        System.out.println("Listening on port " + this.serversocket.getLocalPort());
        ArrayList<String> workerList = new ArrayList<>();

        // Read list of workers from configuration file
        try(BufferedReader br = new BufferedReader(new FileReader( "./config/workers.conf" ))) {
                for(String line; (line = br.readLine()) != null; ) {
                        workerList.add(line);
                }
        } catch (FileNotFoundException ex) {
                Logger.getLogger(GenericRequestListenerThread.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
                Logger.getLogger(GenericRequestListenerThread.class.getName()).log(Level.SEVERE, null, ex);
        }

        // Initialize worker manager
        try {
                WorkerManager.useWorkerList(workerList);
        } catch (Exception ex) {
                Logger.getLogger(GenericRequestListenerThread.class.getName()).log(Level.SEVERE, null, ex);
                System.exit(-1);
        }
        //WorkerManager.printWorkerMap();

        Thread workerStatusThread = new UpdateWorkerStatusThread();
        workerStatusThread.start();
        System.out.println("ready for connections");
        while (!Thread.interrupted()) {
            try {
                // Set up HTTP connection
                Socket socket = this.serversocket.accept();
                HttpServerConnection conn = this.connFactory.createConnection(socket);

                // Initialize the pool
                Thread connectionHandler = new ConnectionHandlerThread(this.httpService, conn);             
                connectionHandler.setDaemon(true);
                connectionHandlerExecutor.execute(connectionHandler);
            } catch (InterruptedIOException ex) {
                    break;
            } catch (IOException e) {
                    System.err.println("I/O error initialising connection thread: "
                        + e.getMessage());
                break;
            }
        }
        // when the listener is interupted shutdown the pool
        // and wait for any Connection Handler threads still running
        connectionHandlerExecutor.shutdown();
        while (!connectionHandlerExecutor.isTerminated()) {}

        System.out.println("Finished all connection handler threads");            
    }