@Override
    public synchronized String connectNotepad(String clientUrl) throws RemoteException {
        try {
            RemoteControllerInterface client = (RemoteControllerInterface) Naming.lookup(clientUrl);
            connectedNotepads.put(clientUrl, client);
            Logger.getLogger(Server.class.getName()).log(Level.INFO, "Connexion du notepad " + clientUrl);
            if(connectedNotepads.keySet().size() == 1) {
                return connectedNotepads.keySet().toArray()[0].toString();
            } else {
                if(connectedNotepads.keySet().toArray()[0].toString().equals(clientUrl)){
                    return connectedNotepads.keySet().toArray()[1].toString();
                } else {
                    return connectedNotepads.keySet().toArray()[0].toString();
                }
            }
        } catch (NotBoundException ex) {
            Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (MalformedURLException ex) {
            Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }