RMI parameters :
Primitive types are given by value.
2. References to remote objects are given as remote references that allow the client process to call methods on the remote objects.
3. Non-remote objects are called by value using object serialization. These objects could allow them to be serialized by importing the java.io.Serializable interface.
The client process initiates the invocation of the remote function by calling the method on the stub. The stub has a reference instance to the remote object and forwards invoke to the skeleton through the reference manager by marshaling the function arguments. During Marshaling each object is checked to check whether it imports java.rmi.Remote interface. If it does then the remote reference is needed as the Marshaled data otherwise the object is serialized into byte streams and given to the remote process where it is de serialized into a similar copy of the local object. The skeleton changes this request from the stub into the appropriate function call on the actual remote object.