11.3. Remote Method Invocation

Remote Method Invocation (RMI) enables objects in one Java virtual machine to seamlessly invoke methods on objects in a remote Java virtual machine. To accomplish the remote invocation, an RMI stub marshals the arguments to the method, using object serialization, and sends the marshaled invocation across the wire to the server. On the server side, the call is received by the RMI system and connected to a skeleton, which is responsible for unmarshaling the arguments and invoking the server’s implementation of the method. When the server’s implementation completes, either by returning a value or by throwing an exception, the skeleton marshals the result and sends a reply to the client’s stub. The stub unmarshals ...

Get Inside Java™ 2 Platform Security: Architecture, API Design, and Implementation, Second Edition 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.