Create a Java project in NetBeans to host the code
that describes the remote interface (named CalcRemoteInterface
)
for a calculator service to be accessed by clients via RMI.
The methods to be supported are at least add
,
sub
, mul
, div
,
all of them with two double
arguments.
Create another Java project to host an implementation
of the interface defined in the previous step (i.e., a "servant").
Moreover, write also a server program to manage it, and run it.
Use the default port for the RMI registry (i.e. 1099).
To create the RMI registry, it can be used
java.rmi.registry.LocateRegistry.createRegistry(port)
.
The registry has to be placed on localhost (127.0.0.1).
Create yet another Java project to host an implementation of a client for the servant defined in step 1 and deployed in step 2. Run the client to check the correct execution of the whole system.