Using the Registry Interface Directly
An alternative definition of the class FileServer:
public class FileServer {
public static void main(String [] args) throws Exception {
FileSource server = new FileSourceImpl() ;
Registry reg =
LocateRegistry.getRegistry(“sirah.csit.fsu.edu”, 4965) ;
reg.rebind(“fileservice”, server) ;
//A remote method invocation
}
}
We are particularly interested in this example because it involves passing a remote object implementation, server, as an argument to a remote method, rebind().