Authors:
- Aurelien Rousseau
- Cyril Ferlicot
To launch a Server you can use ServerMain
.
A Server has a Map
of pseudo and passwords to manage users.
It also has a ServerRepertoireList
to manage the repertoires.
To launch a Client you can use ClientMain
. This main takes 2 parameter.
A String
that is the inet address of the server and an Integer
, the port.
The interface is composed by 3 parts:
- The first one allow to connect to the server. For now there is only one user. The id is
test
and the password istest
. - The second allow to manage your repertoires. If you select
Accéder à un repertoire
you will go to the third one. - The last allow to manage the contacts of the repertoire.
Each command begin by sending an unique command from the Client to the server. Here are the commands and the descriptions.
connexion
- Client: send a
String
with the login and the password te the Server. - Server: send a boolean.
true
if the password is good,false
if the password is wrong.
listeRep
- Server: send a
String
containing all the repertoires's id separated by a space.
chercheRep
- Client: send the
Repertoire
's id to search. - Server: send the
Repertoire
to the client.
retirerRep
- Client: send the
Repertoire
's id to remove. - Server: send a Boolean.
true
if theRepertoire
existed elsefalse
.
ajouterRep
- Client: send the
Repertoire
instance to add. - Server: send a Boolean.
true
if theRepertoire
did not exist, elsefalse
.
accederRep
- Client: send the
Repertoire
's id that we need to select. - Server: send
true
if theRepertoire
exist.
liste
- Server: send a
String
containing all the contacts's name separated by a space.
cherche
- Client: send the
Personne
's id to search. - Server: send the
Personne
to the client.
retirer
- Client: send the
Personne
's id to remove. - Server: send a Boolean.
true
if thePersonne
existed elsefalse
.
ajouter
- Client: send the
Personne
instance to add. - Server: send a Boolean.
true
if thePersonne
did not exist, elsefalse
.
modifier
- Client: send the
Personne
updated. - Server: send
true
if the update succeeded, elsefalse
.