public void runServer () {
        try {

            ServerSocket serverS = new ServerSocket(PORT, 10);

            while (!over) {

                Socket clientSocket = serverS.accept();

                ObjectInputStream in = new ObjectInputStream(clientSocket.getInputStream());
                String inType = (String) in.readObject();
                Object inObj = in.readObject();
                dealWithObjectReceived(inType, inObj);

                ObjectOutputStream out = new ObjectOutputStream(clientSocket.getOutputStream());
                out.writeObject("Hi Client, this is server. Your information has been received");
                out.flush();
                out.close();

                clientSocket.close();
            }
            
            serverS.close();
        }
        catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }