View RSS Feed

RMI

Interfaces: The Heart of RMI

Rate this Entry
by
RMI
, 07-07-2012 at 05:23 PM (957 Views)
One principle is associated with RMI architecture and that is the implementation of behavior and definition of behavior are totally separate concepts. Code is allowed by RMI which defines what behavior is and also the code which keeps it separate.

This is nicely fitted with the distributed system needs where clients have major concern regarding the service definition and servers to be focused to provide the services.

Remote service definition in RMI is coded by usage of a Java interface. In a class, the remote service implementation is being coded. Hence, RMI could be understood by remembering that classes would be defining the implementation and interfaces would define the behavior.

Separation is illustrated in this given diagram:

Name:  1.jpg
Views: 121
Size:  13.7 KB
Remote service definition 1


It shall be remembered that an executable code is not present in java interface. Two classes are supported by RMI which would be implementing the similar interface. First class is the behaviorís implementation that would run at server. Second one acts to be proxy and runs at client. This is shown as following:

Name:  1.jpg
Views: 151
Size:  16.9 KB
Remote service definition 2

Submit "Interfaces: The Heart of RMI" to Facebook Submit "Interfaces: The Heart of RMI" to Digg Submit "Interfaces: The Heart of RMI" to del.icio.us Submit "Interfaces: The Heart of RMI" to StumbleUpon Submit "Interfaces: The Heart of RMI" to Google

Categories
Tutorial

Comments