1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Figure 14. Sample Java code for the client Applet, showing local calls to the methods
of the remote interface (italics) and the returned object (bold)

When the applet is downloaded from the server to the client, it links itself to the RMI registry also running on the server and creates a persistentinterfaceto the remote object, which is bound to the registry by it's service name (init()method in Fig.14). By calling the remote interface methods, the applet retrieves a list of stored database objects and then displays them, or a subset, as a menu list when it starts up (start()method). When a particular entry is chosen (action()method), then the whole of that object is returned to the applet from the remote database using the RMI object serialization procedure - making available all objects's data and class handling methods (shown in bold type - cf. Fig.11). The data entries may then be retrieved locally using the remote object's class methods and displayed either within the applet, or passed on further to the browser window.

The 3D coordinates for the chosen entry are written out to a temporary file on the server where they can be accessed by the Chime plugin14, which is reloaded by a Java-JavaScript call from within the applet, allowing client-based dynamic HTML page generation.

IMAGE imgs/tonge09.gif