Class RemoteFileManager

  • All Implemented Interfaces:
    Remote, FileManager, Createable

    public class RemoteFileManager
    extends FileManagerImpl
    An object of this class can serve as a FileManager for remote FileBackedDictionary instantiations using RMI. This class also contains utility routines to publish a RemoteFileManager for remote use, and to lookup a remote one for local use.

    To make a RemoteFileManager available to remote clients:

       System.setSecurityManager(new RMISecurityManager());
       LocateRegistry.createRegistry(Registry.REGISTRY_PORT);
       new RemoteFileManager().bind();
     

    To create a local Dictionary backed by a remote RemoteFileManager:

       Dictionary dictionary = new FileBackedDictionary(RemoteFileManager.lookup(hostname));