The interface -- IDL

Instructor's Guide

Introduction Interface Broker C++ Java Prolog Configure Conclusions
An interface written in IDL is the point of reference for every CORBA application. It informs the client what to expect from a server, and it tells the server what services it is to deliver.

The definition below defines a module universe that contains an interface named world. The world interface provides the method hello and two additional methods ask and tell.

  module universe { 
interface world {
void hello(); void ask(in string x); string tell(); oneway void halt(); }; };
The ask and tell methods were introduced to show how CORBA deals with in and out or result parameters.

In addition, the world interface supports a method halt, which was introduced to stop the world on the client's demand. In actual applications, you do not want to provide such a method without ensuring that the client has the right to stop the world.