Components
Home ] Up ] Remote Objects ] Remote Method Calls ] [ Components ] The RMI Registry ] A Simple Example ] Listing Remote Objects ] Extended Example ] Caveats ] Passing Objects in RMI ] Remote Callbacks ]

 

 

So, here are the components that one must create in order to construct an RMI client/server application:

  • The remote object interface: This describes what methods may be called on the remote object. (Note that this is shared between the client and the server code.)
  • The remote object implementation: This provides the implementation for the remote object interface. (This only needs to exist on the server.)
  • The server program that creates remote objects. (Server only)
  • The client program that invokes the methods on the remote object. (Client-only)
  • The client stub: A local object that resides on the client and serves as a 'surrogate' for the remote object. (Client-only)
  • The server skeleton: An object that resides on the server, and communicates with the client stub and the actual remote object. (Server-only)

Note that, prior to JDK 1.5 (aka 5.0), you had to use a tool provided with the JDK, rmic (the RMI stub compiler), to generate the client stub and server skeleton classes.

In JDK 1.5 and beyond, the stub class is dynamically generated.  In JDK 1.2 and beyond, the skeleton class no longer exists as a separate entity.

RMI Class Naming Conventions

Here are the naming conventions for the above components:

Description Class/Interface Required?
Remote Object Interface <applicationName> Yes
Remote Object Implementation <applicationName>Impl Yes
Server Program <applicationName>Server Yes
Client Program <applicationName>Client Yes
Client Stub <applicationName>Impl_Stub Only prior to JDK 1.5
Server Skeleton <applicationName>Impl_Skel Only prior to JDK 1.2
 
The page was last updated February 19, 2008