Overview of remote method invocation
General remarks
Calling methods on distant objects is a powerful service offered by Java. Having to code not only the concrete class but also the interface requires having to do the same task twice, and thus entails further risk of errors.
These risks no longer exist with the RMI pattern. In addition, it is incremental, in other words, it can be applied each time the concrete class is modified.
Aim of the pattern
The use of the RMI pattern aims at producing an interface from a class, designed to provide the services on this class which may be invoked from a distance. These services are composed of the class' public methods.
Prerequisite
The pattern applies to a class. Applying this pattern will, amongst other things, add to this class a generalization towards the JDK's "UnicastRemoteObject" class. The class must not, therefore, own any generalizations. If it does, the generation cannot be run.