This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes new to RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "new to RMI" Watch "new to RMI" New topic

new to RMI

naveen chinthakunta

Joined: Sep 26, 2005
Posts: 16
Hi all,

I am pretty new to RMI and I have a trivial question. Is it necessary that all the server code has to be implemented from an interface? I went through some sample code and all seem to be doing the same. Is it just a standard or it has to be done like that. Plz help clearing the doubt.

Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Yes, you design an interface that extends the Remote interface, and then implement that interface in your server. It's required so that both the stub and the actual implementation provide the same methods.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
It is sorta covered in the JavaRanch Style Guide.
subject: new to RMI
Similar Threads
RMI and object and thread sharing
confused about remote object
three questions about java RMI
weird behaviour of singleton pattern in rmi call
Java 1.5 and Dynamic Stub Generation