Java RMI

If a client of a Remote Object, does not invoke any methods present in this Remote Object, but just passes it as arguments to remote method calls of othe remote methods.

Should such a remote object (first one) extend java.rmi.remote ????

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

heyhey_Connect With a Mentor Commented:
when you pass arguments to remote object.
1. if the object does not implement java.rmi.Remote, it is serialized and sent to the remote JavaVM. on the remote computer you'll get a copy of the same object.
2. if the object implements java.rmi.Remote, only a remote reference to that object is sent.
  The Remote interface serves to identify all remote objects. Any object that is a remote object must directly or indirectly implement this interface. Only those methods specified in a remote interface are available remotely.
Implementation classes can implement any number of remote interfaces and can extend other remote implementation classes.
All Courses

From novice to tech pro — start learning today.