Using Java RMI |
The compute engine server accepts tasks from clients, runs them, and returns any results. The server is comprised of an interface and a class. The interface provides the definition for the methods that can be called from the client. Essentially, the interface defines the client's view of the remote object. The class provides the implementation.This section shows you theCompute interface which is the glue that connects the client and server. You will also learn about the RMI API that supports this communication.
Implementing a Remote Interface
In this section, you explore the class that implements theCompute
interface, thereby implementing a remote object. This class also provides the rest of the code that makes up the server program: amain
method that creates an instance of the remote object, registers it with the naming facility, and sets up a security manager.
Using Java RMI |