Java RMI : What is the role of the stub-skeleton that are generated by the rmic compiler

后端 未结 1 2052
北荒
北荒 2021-02-08 22:55

I am currently learning Java RMI (Remote Method Invocation), and I followed the tutorial provided by Oracle on it´s website. I have a particular question however:

What i

相关标签:
1条回答
  • 2021-02-08 23:35

    The Stub/Skeleton hides the communication details away from the developer. The Stub is the class that implements the remote interface. It serves as a client-side placeholder for the remote object. The stub communicates with the server-side skeleton. The skeleton is the stub's counterpart on server-side. Both communicate via the network. The skeleton actually knows the real remote objects delegates the stub's request to it and returns the response to the stub. You require both as they are the essential building blocks for RMI.

    0 讨论(0)
提交回复
热议问题