Interface Repository(IR) example

The ir example illustrates the mechanism used to query the Interface Repository (IR), to traverse the IR and to print its contents.


From this example, you will learn how to:

Directory Contents

Building this example

Typing make(vbmake on Windows) in the ir subdirectory will cause the following executable to be built:

Compilation Warnings

You will see the following compilation warning when you type make(vbmake on Windows) in the ir subdirectory or when you explicitly compile PrintIR.java using: This warning occurs because the example uses a Java API that has been deprecated since JDK1.1. The calls to the deprecated Java API have not been changed for the sake of JDK1.0.2 users.

Running this example

To run the examples, first make sure that the VisiBroker Smart Agent (osagent executable) is running on your network. Then start the Interface Repository server process (irep). A graphical interface will popup from which you can load the file ir.idl into the IR. Alternatively you can start the Interface Repository server process (irep) in the console mode using the command: Next, load  ir.idl  into the ir. Do not quit from the shell started by the irep process.

Next, run the PrintIDL program. The PrintIDL program binds to the IR, looks up the interface requested by the user and prints the names of methods and attributes of the interface stored in the IR associated with it.

Next, run the PrintIR program. The PrintIR program binds to the IR, queries the interface repository for all of its contents, traverses the IR recursively and prints the contents in an IDL like output.  You can match the output against the information in the IDL file  ir.idl 


Return to the top-level examples page.