My other sites |
New Summer Look :)
java.rmi RMI's Subpackages Using RMI in 7 Simple Steps |
|
![]() |
Defines the fundamental classes and interfaces used
for remote method invocation Most of the classes are exception types Subpackages of java.rmi provide additional, more specialised functionality When objects must be passed as arguments to remote methods, RMI uses object serialization (java.io) |
java.rmi.dgc -> java.rmi.registry -> |
Defines the classes and interfaces required for distributed garbage
collection |
![]() |
1. Create an iRemoteInterface that implements java.rmi.Remote
and has as its interface the remote methods 2. Create the class of the remote object by implementing the iRemoteInterface and extending java.rmi.server.UnicastRemoteObject 3. Run rmiregistry 4. Instantiate the remote object and bind it with the registry using java.rmi.Naming.rebind(String, ro) 5. Compile the remote object and use rmic for stubs and skeletons 6. Write the clients using Naming.lookup() to get an iRemoteInterface reference to the remote object, after installing a RMISecurityManager 7. Execute both the server and the client |