plz tell me Internal execution of RMI application
hi
iam learing the RMI .i write first basic application but how the
RMI application is executing iam not getting...tell me how the
execution is performed......with internal details.......step by step
clearly......
client application:
public class Client {
public static void main(String arf[])throws Exception {
java.rmi.Remote r=java.rmi.Naming.lookup("ic");
Implementationclass ic=(Implementationclass)r;
System.out.println(ic.rmprint());
System.out.println("-------client--------");
}
}
Registry application:
public class Myregister {
public static void main(String ar[])throws Exception {
Implementationclass objRemote=new Implementationclass();
java.rmi.Naming.bind("ic",objRemote);
System.out.println("------object binded----");
}
}
interface:
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface Myinterface extends Remote {
public String rmprint()throws RemoteException;
}
implementaion class:
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
public class Implementationclass extends UnicastRemoteObject
implements Myinterface {
public Implementationclass() throws RemoteException {
}
public String rmprint() {
System.out.println("--------in print
method:Implementationclass-------");
return "--------output from RMI--------";
}
}.
---------------------------------------------------------------------------------------------
when RemoteObject is created, internally wht happend when it is
created........how it is n/w enabled...wht happend when it is n/w
enabled.....where println statements r diplayed..... plz tell me step
by step procedure clearly.......bcz iam new to RMI...........