The examplesDir/current/Discovery directory contains the source file for the application that demonstrates the discovery service.
Compile the Java classes.
$ javac -classpath classpath *.java
Start the Client.
$ java -classpath classpath Client
You will be prompted to press Enter to discover connector servers, to provide the host name of a machine where servers are running or to exit the discovery component. However, there are not yet any servers to discover, because the Responder has not yet been started.
In a second terminal window, start the Monitor
$ java -classpath classpath Monitor
You will see confirmation that the monitor has started, and that it is passively listening for notifications,
In a third terminal window, start the Responder.
$ java -classpath classpath Responder
You will see the creation of the different connector servers. Then you will be invited to create further connector servers by pressing Enter.
In the window in which you started the Monitor, you will see the connector servers created by Responder being discovered.
Press Enter in the terminal window in which you started the Client.
You will see the Client discovering the connector servers created by the Responder, and connecting to them to retrieve information about them, before closing the connections.
You can continue discovering and connecting to connector servers for as long as the Responder is active.
When you have finished, stop the Responder, the Monitor and the Client.