29 lines
640 B
Java
29 lines
640 B
Java
import java.rmi.*;
|
|
import java.rmi.server.UnicastRemoteObject;
|
|
|
|
/**
|
|
* Fiche que l'on reçoit du serveur
|
|
*/
|
|
public class RFicheImpl extends UnicastRemoteObject implements RFiche {
|
|
|
|
private String nom;
|
|
private String email;
|
|
|
|
public RFicheImpl(String nom, String email) throws RemoteException {
|
|
this.nom = nom;
|
|
this.email = email;
|
|
}
|
|
|
|
public String getNom() throws RemoteException {
|
|
return this.nom;
|
|
}
|
|
|
|
public String getEmail() throws RemoteException {
|
|
return this.email;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return this.nom + " <" + this.email + ">";
|
|
}
|
|
} |