Class stub

In the distributed computing environment, stub stands for a client side object participating in the distributed object communication.

Role of the stub in the distributed object communication.

The stub acts as a gateway for client side objects and all outgoing requests to server side objects that are routed through it. The stub wraps client object functionality and by adding the network logic ensures the reliable communication channel between client and server. The stub can be written up manually or generated automatically depending on chosen communication protocol.

The stub is responsible for:

Protocols using the stub/skeleton approach

Remote Method Invocation (RMI)

In RMI a stub (which is the bit on the client) is defined by the programmer as an interface. The rmic compiler uses this create the class stub. The stub performs type checking. The skeleton is defined in a class which implements the interface stub. [2]

References

  1. MSDN: Marshalling details.
  2. http://www-itec.uni-klu.ac.at/~harald/ds2001/rmi/rmi.html