@Override
    public void run() {
        try {
            serverSocket = new ServerSocket(SERVER_DATA_SOCKET);

            while (true) {
                // wait for a client request and when received assign it to the
                // client socket
                // when u wanna send data to that client u'll use this socket
                Socket clientConnection = serverSocket.accept();

                logger.debug("Incomming connection from: " + clientConnection.getInetAddress().getHostAddress());

                ConnectionHandler handler = null;
                // Find an empty spot for handling data;
                for (int i = 0; i < datahandlers.length; i++) {
                    if (datahandlers[i] == null) {
                        datahandlers[i] = new ConnectionHandler(i, this);
                        handler = datahandlers[i];
                        break;
                    }
                }

                // Check if we are full
                if (handler != null) {
                    logger.debug("Connection accepted, send to handler.");
                    clientConnection.getOutputStream().write(ConnectionMessages.SERVER_RESPONSE_ACCEPT.getBytes());
                    clientConnection.getOutputStream().flush();
                    handler.handle(clientConnection);
                } else {
                    // Server is busy, reject                
                    try {
                        logger.debug("Connection refused, server to busy!");
                        clientConnection.getOutputStream().write(ConnectionMessages.SERVER_RESPONSE_BUSY.getBytes());
                        clientConnection.close();
                    } catch (IOException ex) {
                        logger.error("Could not close client connection!", ex);
                    }
                }
                clientConnection = null;
            }

        } catch (IOException ex) {
            logger.fatal("Could not open serversocket for data connections.");
        }
    }