p2pgui.ServerFrame Class Reference

Classe che implementa il servizio Server. More...

Inheritance diagram for p2pgui.ServerFrame:
Collaboration diagram for p2pgui.ServerFrame:

Public Member Functions

 ServerFrame ()
 Costruttore che crea la form ServerFrame, prepara i DB, crea un istanza di InquireDB, attiva ServerListener e ServerRMI invocando due thread. More...
 

Static Public Attributes

static Thread t1
 
static Thread t2
 
static p2pserver.InquireDB IDB
 

Private Member Functions

void initComponents ()
 Metodo chiamato dal costruttore per inizializzare la form WARNING: Do NOT modify this code. More...
 
void jButton1ActionPerformed (java.awt.event.ActionEvent evt)
 Azione effettuata in seguito alla pressione del bottone di LogOut: creazione di un istanza di LogOutFramServer() More...
 
void jMenuItem1ActionPerformed (java.awt.event.ActionEvent evt)
 Azione effettuata in seguito alla pressione del bottone di LogOut dal JMenu: creazione di un istanza di LogOutFramServer() More...
 
void jButton2ActionPerformed (java.awt.event.ActionEvent evt)
 Azione effettuata in seguito alla pressione del bottone di Update file list: creazione di un istanza di getFileList() More...
 
void jMenuItem2ActionPerformed (java.awt.event.ActionEvent evt)
 Azione effettuata in seguito alla pressione del bottone di Update user list dal JMenu: creazione di un istanza di getUserList() More...
 
void formWindowClosing (java.awt.event.WindowEvent evt)
 Azioni da effettuare alla chiusura della finestra: cancellazione delle tabelle dal db, chiusura dell'istanza di InquireDB, termine dei thread generati per le classi ServerListener e ServerFrame. More...
 
void jButton3ActionPerformed (java.awt.event.ActionEvent evt)
 Azioni effettuata in seguito alla pressione del bottone Disconnect Client: disconnessione del client e aggiornamento della tabella. More...
 
void jButton4ActionPerformed (java.awt.event.ActionEvent evt)
 Azione effettuata in seguito alla pressione del bottone di Update user list: creazione di un istanza di getUserList() More...
 
void jMenuItem4ActionPerformed (java.awt.event.ActionEvent evt)
 Azione effettuata in seguito alla pressione del bottone di Update file list dal JMenu: creazione di un istanza di getFileList() More...
 
void jMenuItem3ActionPerformed (java.awt.event.ActionEvent evt)
 Azioni effettuata in seguito alla pressione del bottone Disconnect Client dal JMenu: disconnessione del client e aggiornamento della tabella. More...
 
void getUserList ()
 Metodo che tramite IDB ottiene la lista degli utenti collegati e li inserisce nella tabella jTable3. More...
 
void getFileList ()
 Metodo che tramite IDB ottiene la lista dei file condivisi e li inserisce nella tabella jTable4. More...
 
void disconnectClient ()
 Metodo che disconnette il client selezionato dalla jTable3, eliminando il suo report dallo userDB e tutti i suoi file condivisi dal fileListDB. More...
 

Static Private Member Functions

static void getRootData ()
 Metodo che crea una form in cui inserire username e password di root del dbms, e il nome del db di default. More...
 
static void getP2pData ()
 Metodo che crea una password random per il nuovo utente che accede al db. More...
 

Private Attributes

javax.swing.JButton jButton1
 
javax.swing.JButton jButton2
 
javax.swing.JButton jButton3
 
javax.swing.JButton jButton4
 
javax.swing.JLabel jLabel1
 
javax.swing.JLabel jLabel2
 
javax.swing.JLabel jLabel3
 
javax.swing.JMenu jMenu1
 
javax.swing.JMenu jMenu2
 
javax.swing.JMenuBar jMenuBar1
 
javax.swing.JMenuItem jMenuItem1
 
javax.swing.JMenuItem jMenuItem2
 
javax.swing.JMenuItem jMenuItem3
 
javax.swing.JMenuItem jMenuItem4
 
javax.swing.JScrollPane jScrollPane2
 
javax.swing.JScrollPane jScrollPane3
 
javax.swing.JScrollPane jScrollPane4
 
javax.swing.JScrollPane jScrollPane5
 
javax.swing.JSeparator jSeparator1
 
javax.swing.JTable jTable1
 
javax.swing.JTable jTable2
 
javax.swing.JTable jTable3
 
javax.swing.JTable jTable4
 

Static Private Attributes

static boolean detailerr = true
 
static boolean detailok = true
 
static boolean macro = true
 
static String userroot = ""
 
static String pswdroot = ""
 
static String dbroot = ""
 
static String pswdp2p = ""
 
static String userp2p = ""
 
static String dbp2p = ""
 

Detailed Description

Classe che implementa il servizio Server.

Author
HTTPS://WWW.PIETRIS.NET

Definition at line 13 of file ServerFrame.java.

Constructor & Destructor Documentation

◆ ServerFrame()

p2pgui.ServerFrame.ServerFrame ( )
inline

Member Function Documentation

◆ disconnectClient()

void p2pgui.ServerFrame.disconnectClient ( )
inlineprivate

Metodo che disconnette il client selezionato dalla jTable3, eliminando il suo report dallo userDB e tutti i suoi file condivisi dal fileListDB.

Definition at line 617 of file ServerFrame.java.

References p2pgui.ServerFrame.IDB, p2pgui.ServerFrame.jTable3, and p2putility.Util.logGeneric().

Referenced by p2pgui.ServerFrame.jButton3ActionPerformed(), and p2pgui.ServerFrame.jMenuItem3ActionPerformed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ formWindowClosing()

void p2pgui.ServerFrame.formWindowClosing ( java.awt.event.WindowEvent  evt)
inlineprivate

Azioni da effettuare alla chiusura della finestra: cancellazione delle tabelle dal db, chiusura dell'istanza di InquireDB, termine dei thread generati per le classi ServerListener e ServerFrame.

Parameters
evt

Definition at line 434 of file ServerFrame.java.

References p2pgui.ServerFrame.IDB, p2putility.Config.r_clientOpen(), p2pgui.ServerFrame.t1, p2pgui.ServerFrame.t2, and p2putility.Config.w_serverOpen().

Referenced by p2pgui.ServerFrame.initComponents().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFileList()

void p2pgui.ServerFrame.getFileList ( )
inlineprivate

Metodo che tramite IDB ottiene la lista dei file condivisi e li inserisce nella tabella jTable4.

Definition at line 587 of file ServerFrame.java.

References p2pgui.ServerFrame.IDB, and p2pgui.ServerFrame.jTable4.

Referenced by p2pgui.ServerFrame.jButton2ActionPerformed(), p2pgui.ServerFrame.jButton3ActionPerformed(), p2pgui.ServerFrame.jMenuItem3ActionPerformed(), and p2pgui.ServerFrame.jMenuItem4ActionPerformed().

Here is the caller graph for this function:

◆ getP2pData()

static void p2pgui.ServerFrame.getP2pData ( )
inlinestaticprivate

Metodo che crea una password random per il nuovo utente che accede al db.

Definition at line 540 of file ServerFrame.java.

References p2putility.Config.r_dbp2p(), and p2putility.Config.r_userp2p().

Referenced by p2pgui.ServerFrame.ServerFrame().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRootData()

static void p2pgui.ServerFrame.getRootData ( )
inlinestaticprivate

Metodo che crea una form in cui inserire username e password di root del dbms, e il nome del db di default.

Definition at line 523 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.ServerFrame().

Here is the caller graph for this function:

◆ getUserList()

void p2pgui.ServerFrame.getUserList ( )
inlineprivate

Metodo che tramite IDB ottiene la lista degli utenti collegati e li inserisce nella tabella jTable3.

Definition at line 564 of file ServerFrame.java.

References p2pgui.ServerFrame.IDB, and p2pgui.ServerFrame.jTable3.

Referenced by p2pgui.ServerFrame.jButton4ActionPerformed(), and p2pgui.ServerFrame.jMenuItem2ActionPerformed().

Here is the caller graph for this function:

◆ initComponents()

void p2pgui.ServerFrame.initComponents ( )
inlineprivate

◆ jButton1ActionPerformed()

void p2pgui.ServerFrame.jButton1ActionPerformed ( java.awt.event.ActionEvent  evt)
inlineprivate

Azione effettuata in seguito alla pressione del bottone di LogOut: creazione di un istanza di LogOutFramServer()

Parameters
evt

Definition at line 393 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

Here is the caller graph for this function:

◆ jButton2ActionPerformed()

void p2pgui.ServerFrame.jButton2ActionPerformed ( java.awt.event.ActionEvent  evt)
inlineprivate

Azione effettuata in seguito alla pressione del bottone di Update file list: creazione di un istanza di getFileList()

Parameters
evt

Definition at line 415 of file ServerFrame.java.

References p2pgui.ServerFrame.getFileList().

Referenced by p2pgui.ServerFrame.initComponents().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ jButton3ActionPerformed()

void p2pgui.ServerFrame.jButton3ActionPerformed ( java.awt.event.ActionEvent  evt)
inlineprivate

Azioni effettuata in seguito alla pressione del bottone Disconnect Client: disconnessione del client e aggiornamento della tabella.

Parameters
evt

Definition at line 457 of file ServerFrame.java.

References p2pgui.ServerFrame.disconnectClient(), and p2pgui.ServerFrame.getFileList().

Referenced by p2pgui.ServerFrame.initComponents().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ jButton4ActionPerformed()

void p2pgui.ServerFrame.jButton4ActionPerformed ( java.awt.event.ActionEvent  evt)
inlineprivate

Azione effettuata in seguito alla pressione del bottone di Update user list: creazione di un istanza di getUserList()

Parameters
evt

Definition at line 467 of file ServerFrame.java.

References p2pgui.ServerFrame.getUserList().

Referenced by p2pgui.ServerFrame.initComponents().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ jMenuItem1ActionPerformed()

void p2pgui.ServerFrame.jMenuItem1ActionPerformed ( java.awt.event.ActionEvent  evt)
inlineprivate

Azione effettuata in seguito alla pressione del bottone di LogOut dal JMenu: creazione di un istanza di LogOutFramServer()

Parameters
evt

Definition at line 404 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

Here is the caller graph for this function:

◆ jMenuItem2ActionPerformed()

void p2pgui.ServerFrame.jMenuItem2ActionPerformed ( java.awt.event.ActionEvent  evt)
inlineprivate

Azione effettuata in seguito alla pressione del bottone di Update user list dal JMenu: creazione di un istanza di getUserList()

Parameters
evt

Definition at line 424 of file ServerFrame.java.

References p2pgui.ServerFrame.getUserList().

Referenced by p2pgui.ServerFrame.initComponents().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ jMenuItem3ActionPerformed()

void p2pgui.ServerFrame.jMenuItem3ActionPerformed ( java.awt.event.ActionEvent  evt)
inlineprivate

Azioni effettuata in seguito alla pressione del bottone Disconnect Client dal JMenu: disconnessione del client e aggiornamento della tabella.

Parameters
evt

Definition at line 485 of file ServerFrame.java.

References p2pgui.ServerFrame.disconnectClient(), and p2pgui.ServerFrame.getFileList().

Referenced by p2pgui.ServerFrame.initComponents().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ jMenuItem4ActionPerformed()

void p2pgui.ServerFrame.jMenuItem4ActionPerformed ( java.awt.event.ActionEvent  evt)
inlineprivate

Azione effettuata in seguito alla pressione del bottone di Update file list dal JMenu: creazione di un istanza di getFileList()

Parameters
evt

Definition at line 476 of file ServerFrame.java.

References p2pgui.ServerFrame.getFileList().

Referenced by p2pgui.ServerFrame.initComponents().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ dbp2p

String p2pgui.ServerFrame.dbp2p = ""
staticprivate

Definition at line 27 of file ServerFrame.java.

◆ dbroot

String p2pgui.ServerFrame.dbroot = ""
staticprivate

Definition at line 24 of file ServerFrame.java.

◆ detailerr

boolean p2pgui.ServerFrame.detailerr = true
staticprivate

Definition at line 17 of file ServerFrame.java.

◆ detailok

boolean p2pgui.ServerFrame.detailok = true
staticprivate

Definition at line 18 of file ServerFrame.java.

◆ IDB

◆ jButton1

javax.swing.JButton p2pgui.ServerFrame.jButton1
private

Definition at line 492 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jButton2

javax.swing.JButton p2pgui.ServerFrame.jButton2
private

Definition at line 493 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jButton3

javax.swing.JButton p2pgui.ServerFrame.jButton3
private

Definition at line 494 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jButton4

javax.swing.JButton p2pgui.ServerFrame.jButton4
private

Definition at line 495 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jLabel1

javax.swing.JLabel p2pgui.ServerFrame.jLabel1
private

Definition at line 496 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jLabel2

javax.swing.JLabel p2pgui.ServerFrame.jLabel2
private

Definition at line 497 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jLabel3

javax.swing.JLabel p2pgui.ServerFrame.jLabel3
private

Definition at line 498 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jMenu1

javax.swing.JMenu p2pgui.ServerFrame.jMenu1
private

Definition at line 499 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jMenu2

javax.swing.JMenu p2pgui.ServerFrame.jMenu2
private

Definition at line 500 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jMenuBar1

javax.swing.JMenuBar p2pgui.ServerFrame.jMenuBar1
private

Definition at line 501 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jMenuItem1

javax.swing.JMenuItem p2pgui.ServerFrame.jMenuItem1
private

Definition at line 502 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jMenuItem2

javax.swing.JMenuItem p2pgui.ServerFrame.jMenuItem2
private

Definition at line 503 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jMenuItem3

javax.swing.JMenuItem p2pgui.ServerFrame.jMenuItem3
private

Definition at line 504 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jMenuItem4

javax.swing.JMenuItem p2pgui.ServerFrame.jMenuItem4
private

Definition at line 505 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jScrollPane2

javax.swing.JScrollPane p2pgui.ServerFrame.jScrollPane2
private

Definition at line 506 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jScrollPane3

javax.swing.JScrollPane p2pgui.ServerFrame.jScrollPane3
private

Definition at line 507 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jScrollPane4

javax.swing.JScrollPane p2pgui.ServerFrame.jScrollPane4
private

Definition at line 508 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jScrollPane5

javax.swing.JScrollPane p2pgui.ServerFrame.jScrollPane5
private

Definition at line 509 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jSeparator1

javax.swing.JSeparator p2pgui.ServerFrame.jSeparator1
private

Definition at line 510 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jTable1

javax.swing.JTable p2pgui.ServerFrame.jTable1
private

Definition at line 511 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jTable2

javax.swing.JTable p2pgui.ServerFrame.jTable2
private

Definition at line 512 of file ServerFrame.java.

Referenced by p2pgui.ServerFrame.initComponents().

◆ jTable3

javax.swing.JTable p2pgui.ServerFrame.jTable3
private

◆ jTable4

javax.swing.JTable p2pgui.ServerFrame.jTable4
private

◆ macro

boolean p2pgui.ServerFrame.macro = true
staticprivate

Definition at line 19 of file ServerFrame.java.

◆ pswdp2p

String p2pgui.ServerFrame.pswdp2p = ""
staticprivate

Definition at line 25 of file ServerFrame.java.

◆ pswdroot

String p2pgui.ServerFrame.pswdroot = ""
staticprivate

Definition at line 23 of file ServerFrame.java.

◆ t1

Thread p2pgui.ServerFrame.t1
static

◆ t2

Thread p2pgui.ServerFrame.t2
static

◆ userp2p

String p2pgui.ServerFrame.userp2p = ""
staticprivate

Definition at line 26 of file ServerFrame.java.

◆ userroot

String p2pgui.ServerFrame.userroot = ""
staticprivate

Definition at line 22 of file ServerFrame.java.


The documentation for this class was generated from the following file: