Knowing the URL-Naming Service, the only new interface that Caffeine introduces, lets us jump right in and write some code. After all, Caffeine is just another way to develop CORBA code.
The client program consists of a single Java class: HelloWorldCaffeineClient (see Listing 21.1). This class provides a main method that performs the following functions: initializes the ORB; locates and then obtains a reference to a HelloWorld server object; invokes the getGreeting() method to get the greeting string; and displays the average Caffeinated Ping performance.
It is important to note that this example uses a URL-based naming scheme to locate a reference to the remote object.