

Public Member Functions | |
| void | disconnectClient (String usr, String pswd) throws java.rmi.RemoteException |
| Disconnette un client dal server cancellandolo dal DBMS. More... | |
| boolean | serverOn () throws java.rmi.RemoteException |
| Ritorna true se il server e' attivo. More... | |
| boolean | clientAlive (String usr, String pswd) throws java.rmi.RemoteException |
| Verifica se il client e' connesso al server, cioe' se e' presente nel DBMS. More... | |
| String | getAccessStringDelete (String usr, String pswd, String owner_file, String id_file) throws java.rmi.RemoteException |
| Costruisce la stringa di autenticazione che permette ad un client registrato di cancellare un file (se i diritti lo permettono) di un altro client. More... | |
| String | getAccessStringRead (String usr, String pswd, String owner_file, String id_file) throws java.rmi.RemoteException |
| Costruisce la stringa di autenticazione che permette ad un client registrato di scaricare un file (se i diritti lo permettono) di un altro client. More... | |
| String | getAccessStringUpload (String usr, String pswd, String id_client2, String id_file) throws java.rmi.RemoteException |
| Costruisce la stringa di autenticazione che permette ad un client registrato di inviare un file (se i diritti lo permettono) di un altro client. More... | |
| ArrayList | getList (String usr, String pswd, String where) throws java.rmi.RemoteException |
| Restituisce la lista dei file presenti sul DBMS del server, in base alla clausola WHERE specificabile in input. More... | |
| ArrayList | getUserList (String usr, String pswd, String where) throws java.rmi.RemoteException |
| Restituisce la lista degli utenti presenti sul DBMS del server, in base alla clausola WHERE specificabile in input. More... | |
| boolean | removeFile (String usr, String pswd, String name, String path, int state) throws java.rmi.RemoteException |
| Cancella i file presenti sul DBMS del server, in base alla clausola WHERE specificabile in input. More... | |
| boolean | sendList (String usr, String pswd, ArrayList list) throws java.rmi.RemoteException |
| Invia una lista di file al DBMS del server. More... | |
| int | registerToServer (String usr, String pswd) throws java.rmi.RemoteException |
| Inserisce un utente autorizzato (si veda p2putility.Util.login) nella lista utenti del DBMS del server. More... | |
Static Public Member Functions | |
| static void | main (String[] args) |
| Main. More... | |
Protected Member Functions | |
| ServerRMI () throws RemoteException | |
| Costruttore. More... | |
Private Member Functions | |
| boolean | isReg (String u, String p) |
| Funzione privata che verifica se un utente e' registrato nel DBMS del server. More... | |
Private Attributes | |
| String | user |
| int | id_user |
Definition at line 26 of file ServerRMI.java.
|
inlineprotected |
Costruttore.
| RemoteException |
Definition at line 37 of file ServerRMI.java.
Referenced by p2pserver.ServerRMI.main().

|
inline |
Verifica se il client e' connesso al server, cioe' se e' presente nel DBMS.
| usr | username |
| pswd | password |
Implements p2pclient.RMIFuncConstructor.
Definition at line 78 of file ServerRMI.java.
References p2pserver.ServerRMI.isReg(), and p2putility.Util.logServer().

|
inline |
Disconnette un client dal server cancellandolo dal DBMS.
| usr | username |
| pswd | password |
Implements p2pclient.RMIFuncConstructor.
Definition at line 47 of file ServerRMI.java.
References p2pgui.ServerFrame.IDB, and p2putility.Util.logServer().

|
inline |
Costruisce la stringa di autenticazione che permette ad un client registrato di cancellare un file (se i diritti lo permettono) di un altro client.
| usr | username |
| pswd | password |
| owner_file | username del possessore |
| id_file | id univoco del file |
Implements p2pclient.RMIFuncConstructor.
Definition at line 100 of file ServerRMI.java.
References p2pserver.ThreadRmiAuthorization.dbg, p2pserver.ThreadRmiAuthorization.funct, p2putility.Util.hash_sha(), p2pgui.ServerFrame.IDB, p2pserver.ThreadRmiAuthorization.ip, p2pserver.ServerRMI.isReg(), p2pserver.ThreadRmiAuthorization.k, p2putility.Util.logServer(), p2pserver.ClientRmiAuthorization.pswd_to_connect, p2pserver.ClientRmiAuthorization.user_to_connect, and p2pserver.ThreadRmiAuthorization.v.

|
inline |
Costruisce la stringa di autenticazione che permette ad un client registrato di scaricare un file (se i diritti lo permettono) di un altro client.
| usr | username |
| pswd | password |
| owner_file | username del possessore |
| id_file | id univoco del file |
Implements p2pclient.RMIFuncConstructor.
Definition at line 170 of file ServerRMI.java.
References p2pserver.ThreadRmiAuthorization.dbg, p2pserver.ThreadRmiAuthorization.funct, p2putility.Util.hash_sha(), p2pgui.ServerFrame.IDB, p2pserver.ThreadRmiAuthorization.ip, p2pserver.ServerRMI.isReg(), p2pserver.ThreadRmiAuthorization.k, p2putility.Util.logServer(), p2pserver.ClientRmiAuthorization.pswd_to_connect, p2pserver.ClientRmiAuthorization.user_to_connect, and p2pserver.ThreadRmiAuthorization.v.

|
inline |
Costruisce la stringa di autenticazione che permette ad un client registrato di inviare un file (se i diritti lo permettono) di un altro client.
| usr | username |
| pswd | password |
| id_client2 | username del possessore |
| id_file | id univoco del file |
Implements p2pclient.RMIFuncConstructor.
Definition at line 240 of file ServerRMI.java.
References p2pserver.ThreadRmiAuthorization.dbg, p2pserver.ThreadRmiAuthorization.funct, p2putility.Util.hash_sha(), p2pgui.ServerFrame.IDB, p2pserver.ThreadRmiAuthorization.ip, p2pserver.ServerRMI.isReg(), p2pserver.ThreadRmiAuthorization.k, p2putility.Util.logServer(), p2pserver.ClientRmiAuthorization.pswd_to_connect, p2pserver.ClientRmiAuthorization.user_to_connect, and p2pserver.ThreadRmiAuthorization.v.

|
inline |
Restituisce la lista dei file presenti sul DBMS del server, in base alla clausola WHERE specificabile in input.
| usr | username |
| pswd | password |
| where | (e' possiblie inserire codice SQL *) |
Implements p2pclient.RMIFuncConstructor.
Definition at line 291 of file ServerRMI.java.
References p2pgui.ServerFrame.IDB, p2pserver.ServerRMI.isReg(), and p2putility.Util.logServer().

|
inline |
Restituisce la lista degli utenti presenti sul DBMS del server, in base alla clausola WHERE specificabile in input.
| usr | username |
| pswd | password |
| where | (e' possiblie inserire codice SQL *) |
Implements p2pclient.RMIFuncConstructor.
Definition at line 312 of file ServerRMI.java.
References p2pgui.ServerFrame.IDB, p2pserver.ServerRMI.isReg(), and p2putility.Util.logServer().

|
inlineprivate |
Funzione privata che verifica se un utente e' registrato nel DBMS del server.
| u | username |
| p | password |
Definition at line 456 of file ServerRMI.java.
References p2pgui.ServerFrame.IDB, and p2putility.Util.logServer().
Referenced by p2pserver.ServerRMI.clientAlive(), p2pserver.ServerRMI.getAccessStringDelete(), p2pserver.ServerRMI.getAccessStringRead(), p2pserver.ServerRMI.getAccessStringUpload(), p2pserver.ServerRMI.getList(), p2pserver.ServerRMI.getUserList(), p2pserver.ServerRMI.removeFile(), and p2pserver.ServerRMI.sendList().


|
inlinestatic |
Main.
Avvia il server RMI.
| args | (inutilizzato) |
Definition at line 428 of file ServerRMI.java.
References p2putility.Util.logServer(), p2putility.Config.r_clientOpen(), p2putility.Config.r_rmiregport(), and p2pserver.ServerRMI.ServerRMI().
Referenced by p2pserver.ThreadRmiRegistry.run().


|
inline |
Inserisce un utente autorizzato (si veda p2putility.Util.login) nella lista utenti del DBMS del server.
| usr | username |
| pswd | password |
Implements p2pclient.RMIFuncConstructor.
Definition at line 384 of file ServerRMI.java.
References p2pserver.ServerRMI.id_user, p2pgui.ServerFrame.IDB, p2putility.Util.login(), p2putility.Util.logServer(), and p2pserver.ServerRMI.user.

|
inline |
Cancella i file presenti sul DBMS del server, in base alla clausola WHERE specificabile in input.
| usr | username |
| pswd | password |
| name | nome file |
| path | path file |
| state | stato del file |
Implements p2pclient.RMIFuncConstructor.
Definition at line 338 of file ServerRMI.java.
References p2pgui.ServerFrame.IDB, p2pserver.ServerRMI.isReg(), and p2putility.Util.logServer().

|
inline |
Invia una lista di file al DBMS del server.
| usr | username |
| pswd | password |
| list | ArrayList (ArrayList di ArrayList) che contiene i dati dei file da inviare |
Implements p2pclient.RMIFuncConstructor.
Definition at line 357 of file ServerRMI.java.
References p2pgui.ServerFrame.IDB, p2pserver.ServerRMI.isReg(), and p2putility.Util.logServer().

|
inline |
Ritorna true se il server e' attivo.
Implements p2pclient.RMIFuncConstructor.
Definition at line 62 of file ServerRMI.java.
References p2pgui.ServerFrame.IDB, and p2putility.Util.logServer().

|
private |
Definition at line 31 of file ServerRMI.java.
Referenced by p2pserver.ServerRMI.registerToServer().
|
private |
Definition at line 30 of file ServerRMI.java.
Referenced by p2pserver.ServerRMI.registerToServer().