Noel Enete

How to find a lookup service by host and port.


Each instance of this class represents one lookup service. The host and port are accessible from the instance.

This class is instantiated by providing an URL string like "jini://localhost:4160". If the port is omitted, port 4160 (the port reggie listens on) is assumed. During instantiation, the class contacts the host:port and establishes a service connection. This is called performing unicast discovery.

To interact with the lookup service, send the message getRegistrar() to the instance. The ServiceRegistrar object that is returned is used to issue all service requests to the lookup service.


Figure 1: LookupLocatorExample

Run Instructions

To run this example:
  • Start Jini from the JiniExample1 directory using the r1.bat, r2.bat, and r3.bat files.
  • Recompile this example using the c.bat file to move the files into Jini's lib directory.
  • Then start the client from \java \nuggets \pages \examples \LookupLocatorExample \client-side (removing the spaces) using r.bat.

by Noel Enete . . . . . .