Serialization

Remote method calls travel across the network wire between the client and server. Since network packets are just a series of bytes, the parameters to a remote call must be converted into a byte stream. When the network packets arrive on the server, the RMI implementation then converts the byte stream back into objects. RMI utilizes Java's serialization facilities to handle converting remote method parameters to the wire format and back into objects on the server.

Unlike local method calls where parameters can be arbitrary types, RMI parameters and return values must implement either the java.io.Serializable or the java.rmi.Remote interface.

RMI parameters must implement java.io.Serializable or java.rmi.Remote.

The Serializable ...

Get J2EE™ Applications and BEA™ WebLogic Server™ 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.