The RMI is built on three layers.
a. Stub and Skeleton layer
This layer lies just beneath the view of the developer. This layer intercepts method calls made by the client to the interface reference variable and redirects these calls to a remote RMI service.
b. Remote Reference Layer.
This layer understands how to interpret and manage references made from clients to the remote service objects. The connection is a one-to-one (unicast) link.
c. Transport layer
This layer is based on TCP/IP connections between machines in a network. It provides basic connectivity, as well as some firewall penetration strategies.