Parameters for Remote Methods
As just stated, RMI serializes parameters in remote method calls. Actually, RMI passes two different types of entities in method calls:
Serialized objects—These are serialized copies of the local value the client uses as a parameter to the remote method.
Remote references—If the parameter of a remote method is a remote object, defined and instantiated on the client side, RMI sends a remote reference (stub) as a marshalled parameter—not a copy of the object.
This distinction is very critical to the performance of your RMI applications. If you send small values, such as a string that represents a birth date or telephone number, it will not result in a very significant data transfer of marshalled data.
If, on the other ...
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