2. Writing a Client
A successful [software] tool is one that was used to do something undreamed of by its author.
—S.C. Johnson
Let’s make this architecture more concrete, first by showing how you would write a client that uses the Jini architecture. The next section will show how you would write two corresponding service implementations that are usable by this client. We will first describe the service being performed.
2.1. The MessageStream Interface
The example interface MessageStream provides an iterator through a stream of messages. It provides one method that returns the next message in the stream:
package message; public interface MessageStream { Object nextMessage() throws EOFException, RemoteException; }
The nextMessage method returns ...
Get Jini™ Specifications, The, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.