Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Chapter 5. Java RMI: Remote Method Invoc... > A Java RMI Version of the Featured A... - Pg. 116

Java RMI: Remote Method Invocation 116 Callbacks in Short Callbacks are important tools for developers of high-availability servers. Because servers can easily be inundated with invocations from clients, the logical step is to defer those invocations until a time that is both convenient and proper. By setting up callbacks, you can engineer your server to process and accept invocations more efficiently by enabling servers to make invocations when they are ready. With a suite of tools that enable us to create simple clients and servers to more advanced factory servers and callback servers, we can go about implementing our calendar application once again. With sockets, we were able to define our own application messaging system. Now, with Java RMI we will find that creating a server for our featured application is just as easy as creating a regular Java object. A Java RMI Version of the Featured App The advantage of Java-only systems is the language itself. Java's simplicity and gentle learning curve give RMI itself an appearance of simplicity. Java-centric applications do not, however, have the advantages of Java IDL, namely language independence and implementation hiding. We will start by first rewriting the public interface for our server. After that step is complete, we can go about writing clients to talk to the interface and server that will subsequently implement the interface. The RMI system is easy, and finishing the Internet Calendar Server using it is equally so. RMI Interface Remember that our interface must extend the RMI system's Remote classes. As we discussed