aspose file tools*
The moose likes Distributed Java and the fly likes what is need of Interface in RMI why not just class? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "what is need of Interface in RMI why not just class?" Watch "what is need of Interface in RMI why not just class?" New topic
Author

what is need of Interface in RMI why not just class?

Arun Maalik
Ranch Hand

Joined: Oct 25, 2005
Posts: 216
Helo Ranchar

I want to know that in RMI application we need to create a remote interface that contane the method which has been remotely invoked and a class that will implement that remote interface.

Here tell me one thing that why we make a remote interface what is need of that interface ? why we not make only implementation class that method will call remotely.
I mean in RMI application what is need of Interface why not just a class only.

Regard

Arun
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42282
    
  64
The reason for using an interface is the same as it is everywhere - to provide a layer of abstraction. It allows the implementating class to change without the client code needing to be adapted.


Ping & DNS - my free Android networking tools app
Arun Maalik
Ranch Hand

Joined: Oct 25, 2005
Posts: 216
Okay so for everywhere if i will not use interface only if i will use the class in that case what will happen?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is need of Interface in RMI why not just class?