AOOD Week 11
AOOD Week 11
OOP
// Create and start the RMI registry on the default port (1099)
Registry registry = LocateRegistry.createRegistry(1099);
// Bind the server object's stub in the registry
registry.rebind("RMIServer", stub);
@Override
public String sayHello(String name) throws
RemoteException {
return "Hello, " + name + "!";
}
}
internet is a uni cast or multi cast
and why
The main method sets up the RMI server by performing the following
steps:
• Creating an instance of the RMIServer object.
• Exporting the server object using
UnicastRemoteObject.exportObject() to make it available for
remote invocations.
• Creating the RMI registry using LocateRegistry.createRegistry().
• Binding the server object's stub in the registry using
registry.rebind().