Remote Method Parameters
RMI imposes one significant restriction on the types of objects you can use in remote method invocations (either as parameters or return values). You can pass any of the native types (int, float, double, boolean, and so on) but any objects you pass must implement java.io.Serializable or java.rmi.Remote.
When you pass a serializable (local) object as an RMI parameter, the object is referred to as a non-remote object. That is, the entire object goes from the client to the server or from the server to the client. When you pass a remote object as an RMI parameter, on the other hand, RMI passes a remote reference. That is, instead of passing in an entire object, RMI passes what eventually becomes a stub. The remote object ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access