//This is timeServer that is responsible for time two integer numbers import java.net.*; import java.rmi.*; import java.rmi.server.UnicastRemoteObject; public class timeServerImpl extends UnicastRemoteObject implements timeInterface{ String newLine = System.getProperty("line.separator"); public timeServerImpl() throws RemoteException{ System.out.println("Initializing timeserver"); } public static void main(String arg[]){ System.setSecurityManager(new RMISecurityManager()); try{ timeServerImpl TSI=new timeServerImpl(); Naming.rebind("timeserver", TSI); System.out.println("registered with Registry"); } catch (RemoteException e){ System.out.println("I catch RemoteExceptiom Error: " + e); } catch (java.net.MalformedURLException e){ System.out.println("URL Error:" + e); } } public String time(int a, int b){ return ("The time method is invoked in time server"+ newLine+a+"*"+b+" = "+(a*b)+newLine+newLine); } }