DFSS
Class DFSSserviceManager

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended byDFSS.DFSSserviceManager
All Implemented Interfaces:
IDistributedFileSystemService, IDistributedFileSystemServiceManager, java.rmi.Remote, java.io.Serializable

public class DFSSserviceManager
extends java.rmi.server.UnicastRemoteObject
implements IDistributedFileSystemServiceManager

Author:
Dario Agostinone Implementazione di un serviceManager
See Also:
Serialized Form

Constructor Summary
DFSSserviceManager(HostID myID, IQueueManager queue, IQueueManager msgQueue, CallManager call, Datamanager data, IGroupManager group, IFileRepositoryServer rep, boolean ready)
          Costruttore
 
Method Summary
 void aggiungiNodo(HostID in)
          Permette di aggiungere un nuovo nodo
 void apprendi(Directory root, HostID[] hosts)
           
 void creaFile(java.lang.String path, IClientCallBack cl)
          Crea il file path
 void createDirectory(java.lang.String path, IClientCallBack cl)
          Creo la cartella path
 void getDirectory(java.lang.String path, IClientCallBack client)
          Accede al contenuto della cartella path
 void leggiFile(java.lang.String path, IClientCallBack cl)
          Permette di avere acceso in lettura al file path
static void main(java.lang.String[] args)
           
 boolean receiveMessage(Message in)
          Metodo che permette la ricezione di un messaggio
 void rimuoviDirectory(java.lang.String path, IClientCallBack cl)
          Rimuove la directory path
 void rimuoviFile(java.lang.String path, IClientCallBack cl)
          Elimina il file path
 void scriviFile(java.lang.String path, boolean append, IClientCallBack cl)
          permette di avere un acceso in scrittura al file path
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DFSSserviceManager

public DFSSserviceManager(HostID myID,
                          IQueueManager queue,
                          IQueueManager msgQueue,
                          CallManager call,
                          Datamanager data,
                          IGroupManager group,
                          IFileRepositoryServer rep,
                          boolean ready)
                   throws java.rmi.RemoteException
Costruttore

Method Detail

receiveMessage

public boolean receiveMessage(Message in)
                       throws java.rmi.RemoteException
Metodo che permette la ricezione di un messaggio

Specified by:
receiveMessage in interface IDistributedFileSystemServiceManager
Throws:
java.rmi.RemoteException

aggiungiNodo

public void aggiungiNodo(HostID in)
                  throws java.rmi.RemoteException
Permette di aggiungere un nuovo nodo

Specified by:
aggiungiNodo in interface IDistributedFileSystemServiceManager
Throws:
java.rmi.RemoteException

apprendi

public void apprendi(Directory root,
                     HostID[] hosts)
              throws java.rmi.RemoteException
Specified by:
apprendi in interface IDistributedFileSystemServiceManager
Throws:
java.rmi.RemoteException

getDirectory

public void getDirectory(java.lang.String path,
                         IClientCallBack client)
                  throws java.rmi.RemoteException
Accede al contenuto della cartella path

Specified by:
getDirectory in interface IDistributedFileSystemService
Throws:
java.rmi.RemoteException

createDirectory

public void createDirectory(java.lang.String path,
                            IClientCallBack cl)
                     throws java.rmi.RemoteException
Creo la cartella path

Specified by:
createDirectory in interface IDistributedFileSystemService
Throws:
java.rmi.RemoteException

rimuoviDirectory

public void rimuoviDirectory(java.lang.String path,
                             IClientCallBack cl)
                      throws java.rmi.RemoteException
Rimuove la directory path

Specified by:
rimuoviDirectory in interface IDistributedFileSystemService
Throws:
java.rmi.RemoteException

leggiFile

public void leggiFile(java.lang.String path,
                      IClientCallBack cl)
               throws java.rmi.RemoteException
Permette di avere acceso in lettura al file path

Specified by:
leggiFile in interface IDistributedFileSystemService
Throws:
java.rmi.RemoteException

scriviFile

public void scriviFile(java.lang.String path,
                       boolean append,
                       IClientCallBack cl)
                throws java.rmi.RemoteException
permette di avere un acceso in scrittura al file path

Specified by:
scriviFile in interface IDistributedFileSystemService
Throws:
java.rmi.RemoteException

creaFile

public void creaFile(java.lang.String path,
                     IClientCallBack cl)
              throws java.rmi.RemoteException
Crea il file path

Specified by:
creaFile in interface IDistributedFileSystemService
Throws:
java.rmi.RemoteException

rimuoviFile

public void rimuoviFile(java.lang.String path,
                        IClientCallBack cl)
                 throws java.rmi.RemoteException
Elimina il file path

Specified by:
rimuoviFile in interface IDistributedFileSystemService
Throws:
java.rmi.RemoteException

main

public static void main(java.lang.String[] args)