Calling a Remote Object with a Remote Object Parameter: Code Examples
The code so far has used local parameters. RMI made a copy of the libraryCardNumber string and serialized it in a marshalling stream. For such a small piece of data, that is fine. A very large object might create a performance problem. In the following steps, I will show you how to use a remote object for a parameter so that only the remote reference (and not the whole object) is passed when a remote method call is made by the client. Most of the code and the steps are the same as those for a basic RMI program that passes local objects for parameters, except that you need a remote object for the libraryCardNumber. Therefore, the code will be changed to accept a LibraryCard ...
Get PURE Java™ 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.