Basic HTML version of Foils prepared 3 Feb 98

Foil 5 Stubs

From Overview of Distributed Objects and RMI in Java 1.1 ARL Database Tutorial and CPS616 -- February 98. by Nancy McCracken


To call a method on a remote machine, a surrogate method is set up for you on the local machine, called the stub.
It packages the parameters, resolving local references. This is called marshalling the parameters:
  • device-independent encoding of numbers
  • strings and objects may have local memory references and so are passed by object serialization
The stub builds an information block with
  • An identifier of the remote object to be used
  • An operation number, describing the method to be called
  • The marshalled parameters
Stubs will also "unmarshall" return values after the call and receive RemoteExceptions. It will throw the exceptions in the local space.



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Nov 29 1998