src/java_api contains a definition for a Pedro client
class and support for Prolog terms (including a Prolog parser).
Client.java contains a very simple program that connects to the
Pedro server, makes a subscription based on the runtime arguments, and enters
a loop that parses the received notification into Prolog terms then
pretty prints them.
The Pedro client object creation and methods are the same as in the Python
case from the previous section except there is no
This is replaced by the use of a parser that converts strings (from a
get_notification()) to a Prolog term.
PedroListener.java provide support
for data events from the Pedro server. Clients can add listeners to data events
addPedroListener method. The file
is similar to
pedro_gui.py and contains
an example of using this method.