-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEventManagerInterface.java
More file actions
82 lines (69 loc) · 2.82 KB
/
EventManagerInterface.java
File metadata and controls
82 lines (69 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import java.io.IOException;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.LinkedList;
/**
* EventManagerInterface rappresenta l'interfaccia offerta al client
*
*/
public interface EventManagerInterface extends Remote {
/**
*
* @param username nome dell'utente da registrare
* @param password password associata all'utente da registrare
* @return true se l'utente è stato correttamente registrato
* false se l'utente era già registrato
* @throws RemoteException se si verificano durante l'esecuzione della chiamata remota
* @throws IllegalArgumentException se l'argomento passato risulta invalido
* @throws IOException
*/
boolean registerUser(String username, String password) throws RemoteException, IllegalArgumentException, IOException;
/**
*
* @return lista degli utenti registrati al servizio
* @throws RemoteException se si verificano durante l'esecuzione della chiamata remota
*/
LinkedList<UtenteStatus> getListUsers() throws RemoteException;
/**
* @param username nome dell'utente che vuole loggarsi
* @param password password associata all'utente
* @return true se username esiste e la password è corretta, false altrimenti
* @throws RemoteException se si verificano durante l'esecuzione della chiamata remota
*/
boolean loginUser(String username, String password) throws RemoteException;
/**
* @param name nome dell'utente da cercare nel servizio
* @return true se l'utente è già registrato, false altrimenti
* @throws RemoteException
*/
boolean checkUser(String name) throws RemoteException;
/**
*
* @param ClientInterface client che si vuole registare al servizio di notifica
* @param name username dell'utente loggato sul client
* @throws RemoteException
*/
public void registerForCallback (NotifyEventInterface ClientInterface, String name) throws RemoteException;
/**
*
* @param ClientInterface client che vuole disiscriversi dal servizio di notifica
* @param name nome dell'utente loggato sul client
* @throws RemoteException
*/
public void unregisterForCallback (NotifyEventInterface
ClientInterface, String name) throws RemoteException;
/**
* aggiorna tutti i client collegati al server RMI che
* un nuovo utente si è registrato a Worth
* @param name nome del nuovo utente registrato
* @throws RemoteException
*/
public void update(String name) throws RemoteException;
/**
*
* @param name nome dell'utente che ha aggiornato il suo stato on/off
* @param status stato attuale dell'utente
* @throws RemoteException
*/
public void update(String name, boolean status) throws RemoteException;
}